In short: get rid of needing #1664602: Allow attributes to be passed to drupal_add_[css|js] (SRI) for this module to work. That issue is unlikely to go in.

It looks like it might be possible to improve AE upstream, since they're working on reducing the amount of magic right now anyway: https://github.com/alohaeditor/Aloha-Editor/issues/737#issuecomment-9296806

CommentFileSizeAuthor
#2 aloha_defer_workaround-1808466.patch692 bytesquicksketch

Comments

quicksketch’s picture

Version: 8.x-2.x-dev » 7.x-2.x-dev
Status: Active » Needs review

I've revived that above issue with a new approach that looks like it's going to move forward because it both fixes an existing bug and solves problems for other libraries. However for D7, the patch is not back-portable. For D7 and Spark, I suggest we simply use a 3 line workaround (regex). See patch.

We could use this for both D8 and D7 in the mean time, but I think #1664602: Allow attributes to be passed to drupal_add_[css|js] (SRI) will make it unneeded for D8.

quicksketch’s picture

StatusFileSize
new692 bytes

Patch.

wim leers’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Assigned: wim leers » Unassigned
Priority: Major » Critical
Status: Needs review » Postponed

100% agreed with #1.

#2 committed to D7 & D8 (with only s/temporarily/temporary):
- D8: http://drupalcode.org/project/aloha.git/commit/af003fa
- D7: http://drupalcode.org/project/aloha.git/commit/1563e28

(And DAMMIT, I forgot to use git attribution this time :( I'm so sorry, @quicksketch!)

Moving to D8, marking as postponed. Once they've gotten rid of this upstream, I'll remove the attribute from the Aloha module in both D8 and D7 and mark this issue as fixed. Note that when that happens, the 'defer' => TRUE on aloha.js should be removed.

wim leers’s picture

However, the patch in #2 did not yet get rid of the data-aloha-defer-init attributes being added "the old school way", so I can at least attribute that to @quicksketch :)

- D8: http://drupalcode.org/project/aloha.git/commit/e11bea0
- D7: http://drupalcode.org/project/aloha.git/commit/29a8780

wim leers’s picture

Issue tags: +post-feature freeze

.