[wp-trac] [WordPress Trac] #35760: Provide API for TinyMCE editor to be dynamically instantiated via JS
WordPress Trac
noreply at wordpress.org
Tue May 2 21:01:10 UTC 2017
#35760: Provide API for TinyMCE editor to be dynamically instantiated via JS
-------------------------+-------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: | Focuses: javascript
-------------------------+-------------------------
Comment (by mihai2u):
@westonruter
According to my tests the wp.editor.initialize function call takes ±100ms
to run - both on first initialisation, and on subsequent TinyMCE
initialisations just as well.
This seems to match the delay you experienced here with it requiring 100ms
of 'visibility' before someone can interact with them.
Correlation != causality... but my guess is that this is the browser's way
to protect the computer resources by delaying any scripting that belongs
to iframe's that are not visible.
I would recommend hiding it with something else than display: none (maybe
position: absolute; left: -999em; instead) ... and see whether the browser
behaves differently and allows the scripting to take place even before the
user interacts with it and the iframe turns into becoming visible.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35760#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list