From 726f5f7b2d7ee3f780bee57f006773d9935fe1e6 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 13 Dec 2017 05:16:30 +0000 Subject: [PATCH] Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode. See #40854. Amends [41985]. Props aduth. Fixes #42416 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42390 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mce-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index f5aa2337ea..8865279239 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -863,7 +863,7 @@ // Obtain the target width for the embed. if ( self.editor ) { - maxwidth = self.editor.iframeElement.clientWidth - 20; // Minus the sum of horizontal margins and borders. + maxwidth = self.editor.getBody().clientWidth; } wp.ajax.post( this.action, {