From f97a5aee3a5023da3e2deb2ab2d4728546d2152d Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 13 Oct 2014 21:14:50 +0000 Subject: [PATCH] Editor-expand: reset the editor height after the window is resized. Fixes #29952 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@29886 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/editor-expand.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wp-admin/js/editor-expand.js b/src/wp-admin/js/editor-expand.js index 0ce5e40658..afacd32c8a 100644 --- a/src/wp-admin/js/editor-expand.js +++ b/src/wp-admin/js/editor-expand.js @@ -603,6 +603,12 @@ jQuery( document ).ready( function( $ ) { } adjust(); + }).on( 'wp-window-resized.editor-expand', function() { + if ( mceEditor && ! mceEditor.isHidden() ) { + mceEditor.execCommand( 'wpAutoResize' ); + } else { + textEditorResize(); + } }); $textEditor.on( 'focus.editor-expand input.editor-expand propertychange.editor-expand', textEditorResize );