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:
Andrew Ozz 2016-07-26 22:06:28 +00:00
parent b86015e78b
commit 59c1e02c84
3 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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.