Editor scrolling: fix window height when switching Visual to Text and the editor is shorter. Props mackensen, fixes #29226.

Built from https://develop.svn.wordpress.org/trunk@29592


git-svn-id: http://core.svn.wordpress.org/trunk@29366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-24 23:12:15 +00:00
parent 15b0d10544
commit 58752f91db
2 changed files with 13 additions and 1 deletions

View File

@ -73,6 +73,11 @@ jQuery( document ).ready( function($) {
statusBarHeight: $statusBar.outerHeight() || 0,
sideSortablesHeight: $sideSortables.height() || 0
};
// Adjust for hidden
if ( heights.menuBarHeight < 3 ) {
heights.menuBarHeight = 0;
}
}
function textEditorKeyup( event ) {
@ -216,7 +221,14 @@ jQuery( document ).ready( function($) {
}
function mceHide() {
var wrapHeight = $( '#wpwrap' ).height();
textEditorResize();
if ( wrapHeight && $window.scrollTop() > wrapHeight ) {
window.scrollTo( window.pageXOffset, wrapHeight - 1 );
}
adjust();
}

File diff suppressed because one or more lines are too long