mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
15b0d10544
commit
58752f91db
@ -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();
|
||||
}
|
||||
|
||||
|
2
wp-admin/js/editor-expand.min.js
vendored
2
wp-admin/js/editor-expand.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user