diff --git a/src/wp-admin/js/editor-expand.js b/src/wp-admin/js/editor-expand.js index 75496c26ce..f5886c60fd 100644 --- a/src/wp-admin/js/editor-expand.js +++ b/src/wp-admin/js/editor-expand.js @@ -682,7 +682,13 @@ } function off() { - var height = window.getUserSetting('ed_size'); + var height = parseInt( window.getUserSetting( 'ed_size', 300 ), 10 ); + + if ( height < 50 ) { + height = 50; + } else if ( height > 5000 ) { + height = 5000; + } // Scroll to the top when triggering this from JS. // Ensures toolbars are reset properly.