Editor scrolling: fix window height when switching Visual to Text and the editor is shorter. Props mackensen, fixes #29226.
git-svn-id: https://develop.svn.wordpress.org/trunk@29592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4820f78f66
commit
78b5ccd55c
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user