Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Shorthand functions in plugin.js like `_setUpDynamicEditables()` break functionality in IE11, since shorthand functions are not supported. I'm not that worried about it, though I have some clients that need to use IE11 (because; reasons). Officially Drupal 8 should support IE11 right?
This "bug" will trigger a: SCRIPT1003: Expected ':'
Comment | File | Size | Author |
---|---|---|---|
#5 | entity_embed-3062737-3.patch | 2.47 KB | narnua |
#2 | 3062737-2.patch | 2.47 KB | oknate |
Comments
Comment #2
oknateInitial patch that replaces shorthand with declarations with colons. I haven't tested on ie11.
Comment #3
oknateI tested #2 on IE11. I didn't see any issues.
Comment #4
Wim LeersWoah, excellent catch! This reminds me: we should make this comply with Drupal core's
eslint
. Then this would not have been possible. That means we should rename our currentplugin.js
toplugin.es6.js
and then leteslint
perform the necessary transpilation intoplugin.js
.Either you can create that follow-up issue, or I can, but we should definitely do that before tagging a stable
8.x-1.0
release!Comment #5
narnua CreditAttribution: narnua commentedPatch fails for me locally, under @@ -262,7 +262,7 @@ doesn't match with rc2:
if (this.data.hasCaption && this.editables.caption.getData() !== this.data.attributes['data-caption']) {
This is the line in RC2
if (this.data.hasCaption && this.editables.caption.$.innerHTML !== this.data.attributes['data-caption']) {
Made a new patch with the (seemingly) correct version of the above line, as we will need a functional patch for a production site update soon.
Edit: attached patch is for rc2.
Comment #6
Wim Leers#5: the patch in #2 applies to
8.x-1.x
HEAD, which is two commits ahead of8.x-1.0-rc2
. Nonetheless, it's helpful to have a patch for RC2 users!Comment #7
idflood CreditAttribution: idflood at Stimul.ch commentedApplied the patch in #5 on rc-2 for a production website and it fixed the issue. I quickly checked the code and everything looks right. Thanks narnua.
Comment #9
Wim Leers@oknate created that follow-up: #3063043: replace plugin.js with plugin.es6.js. I was hoping to land that instead of this, but despite Drupal Core JavaScript maintainer @alwaysworking handling that, it seems to be less trivial than expected. So, committing this while waiting for that to happen.
Thanks all!