mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
7bd3ea7da9
commit
5715db82d4
@ -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 ) {
|
||||
|
2
wp-includes/js/mce-view.min.js
vendored
2
wp-includes/js/mce-view.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user