-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.12+ / jQuery 3 - Entwine onmatch events firing before document-ready #1469
Comments
I’m actually noticing this in SS5 too: currently TinyMCE appears to be attempting to initialise too early, causing console errors:
TinyMCE will still load (presumably onmatch fires again later), but applying the hotfix above stops the errors occurring. Edit: this warning also shows in SS4 |
kinglozzer
added a commit
to kinglozzer/silverstripe-admin
that referenced
this issue
Mar 16, 2023
kinglozzer
added a commit
to kinglozzer/silverstripe-admin
that referenced
this issue
Mar 16, 2023
kinglozzer
added a commit
to kinglozzer/silverstripe-admin
that referenced
this issue
Mar 17, 2023
GuySartorelli
added a commit
that referenced
this issue
Mar 17, 2023
FIX: Delay entwine onmatch until DOMContentLoaded (fixes #1469)
PR merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Still investigating this and trying to nailing down some easier recreation steps, as this is all a follow-on from tractorcow-farm/silverstripe-fluent#780. Currently I’m testing/debugging this by just hacking around in dist files, so to illustrate it you can dump the following in the dist file
admin/thirdparty/popper/popper.min.js
:In 4.12,
onmatch
is fired before document ready, prior to 4.12 it’s fired afterwards.Digging deeper, the
EntwineSubtreeMaybeChanged
event is now firing prior to DOM-ready. The root cause of that is probably this change in jQuery 3 https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronousOne workaround that appears to fix this is to wrap this
runSoon()
function so it’ll only fire after document-ready:silverstripe-admin/thirdparty/jquery-entwine/jquery.entwine.js
Lines 1392 to 1393 in 4f32407
Instead use:
PRs
The text was updated successfully, but these errors were encountered: