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:
parent
ae596dd60b
commit
ac463e5c71
|
@ -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
Loading…
Reference in New Issue