[wp-trac] [WordPress Trac] #31412: TinyMCE views improvements
WordPress Trac
noreply at wordpress.org
Wed Mar 11 22:14:04 UTC 2015
#31412: TinyMCE views improvements
-------------------------+-------------------------
Reporter: iseulde | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: TinyMCE | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
-------------------------+-------------------------
Comment (by mattheu):
I've found a small - somewhat edge case issue with `setIframes`. Since
this ticket tackles quite a few things - I'm going to post it here.
If you call `setIframes` twice in quick succession, then you can end up
with the iFrame content being shown twice. This only happens for previews
that are sandboxed in an iFrame.
You can replicate this by replacing `render()` in the `initialize` method
of the av view with `render( true ); render( true );`
I think the reason for this is the timeout in the `setIframes` method.
`content.innerHTML` is reset outside of the callback. Calling it twice in
quick succession causes the content to be appended to the content from the
first call.
A simple fix is to move `content.innerHTML = '';` inside the timeout
callback - resetting the content innerHTML each time.
Uploading a patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31412#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list