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.jstoplugin.es6.jsand then leteslintperform 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.0release!Comment #5
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.xHEAD, which is two commits ahead of8.x-1.0-rc2. Nonetheless, it's helpful to have a patch for RC2 users!Comment #7
idflood 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!