TinyMCE wpView: fire nodeChanged
when an embedded iframe is resized so we can adjust the editor height and other UI components. Props iseulde, fixes #30646.
git-svn-id: https://develop.svn.wordpress.org/trunk@31466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
73a85825fb
commit
0dd81fe134
@ -207,8 +207,18 @@ window.wp = window.wp || {};
|
||||
iframeDoc.close();
|
||||
|
||||
resize = function() {
|
||||
var $iframe, iframeDocHeight;
|
||||
|
||||
// Make sure the iframe still exists.
|
||||
iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).height() );
|
||||
if ( iframe.contentWindow ) {
|
||||
$iframe = $( iframe );
|
||||
iframeDocHeight = $( iframeDoc.body ).height();
|
||||
|
||||
if ( $iframe.height() !== iframeDocHeight ) {
|
||||
$iframe.height( iframeDocHeight );
|
||||
editor.nodeChanged();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if ( MutationObserver ) {
|
||||
|
Loading…
Reference in New Issue
Block a user