From 84c0411bcc2a9aeaed686b4a4d5c1410658884e7 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 14 Jan 2015 21:32:23 +0000 Subject: [PATCH] TinyMCE: select the iframe element by id. Needed as some browser extensions insert extra elements in the page. Props avryl, see #30785. git-svn-id: https://develop.svn.wordpress.org/trunk@31180 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index dd2113bef8..ba190d7071 100644 --- a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -185,7 +185,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { windowWidth = window.innerWidth; toolbarWidth = toolbarNode.offsetWidth; toolbarHalf = toolbarWidth / 2; - iframe = editor.getContentAreaContainer().firstChild; + iframe = document.getElementById( editor.id + '_ifr' ); iframePos = DOM.getPos( iframe ); iframeWidth = iframe.offsetWidth; iframeHeigth = iframe.offsetHeight;