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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-02-15 18:19:27 +00:00
parent 7bd3ea7da9
commit 5715db82d4
3 changed files with 13 additions and 3 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31465';
$wp_version = '4.2-alpha-31466';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.