TinyMCE wpView: add small delay before inserting wpview sandbox iframes into the DOM. Fixes a problem in Firefox that may prevent rendering them. Fixes #29241.

Built from https://develop.svn.wordpress.org/trunk@29513


git-svn-id: http://core.svn.wordpress.org/trunk@29290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-17 03:43:18 +00:00
parent ae596dd60b
commit ac463e5c71
2 changed files with 50 additions and 46 deletions

View File

@ -127,6 +127,9 @@ window.wp = window.wp || {};
content.innerHTML = ''; content.innerHTML = '';
// Seems Firefox needs a bit of time to insert/set the view nodes, or the iframe will fail
// especially when switching Text => Visual.
setTimeout( function() {
iframe = dom.add( content, 'iframe', { iframe = dom.add( content, 'iframe', {
src: tinymce.Env.ie ? 'javascript:""' : '', src: tinymce.Env.ie ? 'javascript:""' : '',
frameBorder: '0', frameBorder: '0',
@ -174,6 +177,7 @@ window.wp = window.wp || {};
setTimeout( resize, i * 700 ); setTimeout( resize, i * 700 );
} }
} }
}, 50 );
}); });
} else { } else {
this.setContent( html ); this.setContent( html );

File diff suppressed because one or more lines are too long