WordPress.org

Make WordPress Core

Changeset 30586


Ignore:
Timestamp:
11/27/2014 12:59:04 AM (6 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/editor-expand.js

    r30573 r30586  
    316316        // Adjust the toolbars based on the active editor mode.
    317317        function adjust( event ) {
    318             var type = event && event.type;
    319 
    320318            // Make sure we're not in fullscreen mode.
    321319            if ( fullscreen && fullscreen.settings.visible ) {
     
    324322
    325323            var windowPos = $window.scrollTop(),
     324                type = event && event.type,
    326325                resize = type !== 'scroll',
    327326                visual = ( mceEditor && ! mceEditor.isHidden() ),
     
    468467                        ( windowPos + heights.windowHeight ) <= ( editorPos + editorHeight + heights.bottomHeight + heights.statusBarHeight + borderWidth ) ) {
    469468
    470                     if ( event && event.deltaHeight > 0 ) {
     469                    if ( event && event.deltaHeight > 0 && event.deltaHeight < 100 ) {
    471470                        window.scrollBy( 0, event.deltaHeight );
    472471                    } else if ( advanced ) {
     
    493492                    $statusBar.add( $bottom ).attr( 'style', '' );
    494493
    495                     ! advanced && $statusBar.css( 'visibility', 'hidden' );
     494                    if ( ! advanced ) {
     495                        $statusBar.css( 'visibility', 'hidden' );
     496                    }
    496497                }
    497498            }
Note: See TracChangeset for help on using the changeset viewer.