Editor: limit scrolling triggered when TinyMCE is auto-resized to 100px. Prevents auto-scrolling on page load. Fixes #30515.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-11-27 01:00:25 +00:00
parent 213ecc8a07
commit 4d651b90bb
3 changed files with 7 additions and 6 deletions

View File

@ -315,14 +315,13 @@
// Adjust the toolbars based on the active editor mode.
function adjust( event ) {
var type = event && event.type;
// Make sure we're not in fullscreen mode.
if ( fullscreen && fullscreen.settings.visible ) {
return;
}
var windowPos = $window.scrollTop(),
type = event && event.type,
resize = type !== 'scroll',
visual = ( mceEditor && ! mceEditor.isHidden() ),
buffer = autoresizeMinHeight,
@ -467,7 +466,7 @@
// +[n] for the border around the .wp-editor-container.
( windowPos + heights.windowHeight ) <= ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight + borderWidth ) ) {
if ( event && event.deltaHeight > 0 ) {
if ( event && event.deltaHeight > 0 && event.deltaHeight < 100 ) {
window.scrollBy( 0, event.deltaHeight );
} else if ( advanced ) {
fixedBottom = true;
@ -492,7 +491,9 @@
$statusBar.add( $bottom ).attr( 'style', '' );
! advanced && $statusBar.css( 'visibility', 'hidden' );
if ( ! advanced ) {
$statusBar.css( 'visibility', 'hidden' );
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-beta2-30585';
$wp_version = '4.1-beta2-30586';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.