TinyMCE, wpView: bail early when the iframe node is not attached to the DOM. We can't load any HTML in it as here is no `iframe.contentWindow` in these cases.
See #36434. Built from https://develop.svn.wordpress.org/trunk@38157 git-svn-id: http://core.svn.wordpress.org/trunk@38098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b86015e78b
commit
59c1e02c84
|
@ -539,6 +539,14 @@
|
|||
dom.add( node, 'span', { 'class': 'wpview-end' } );
|
||||
} );
|
||||
|
||||
// Bail if the iframe node is not attached to the DOM.
|
||||
// Happens when the view is dragged in the editor.
|
||||
// There is a browser restriction when iframes are moved in the DOM. They get emptied.
|
||||
// The iframe will be rerendered after dropping the view node at the new location.
|
||||
if ( ! iframe.contentWindow ) {
|
||||
return;
|
||||
}
|
||||
|
||||
iframeDoc = iframe.contentWindow.document;
|
||||
|
||||
iframeDoc.open();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-beta4-38156';
|
||||
$wp_version = '4.6-beta4-38157';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue