Make WordPress Core

Changeset 29592


Ignore:
Timestamp:
08/24/2014 11:11:03 PM (11 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

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

    r29579 r29592  
    7474            sideSortablesHeight: $sideSortables.height() || 0
    7575        };
     76
     77        // Adjust for hidden
     78        if ( heights.menuBarHeight < 3 ) {
     79            heights.menuBarHeight = 0;
     80        }
    7681    }
    7782
     
    217222
    218223        function mceHide() {
     224            var wrapHeight = $( '#wpwrap' ).height();
     225
    219226            textEditorResize();
     227
     228            if ( wrapHeight && $window.scrollTop() > wrapHeight ) {
     229                window.scrollTo( window.pageXOffset, wrapHeight - 1 );
     230            }
     231
    220232            adjust();
    221233        }
Note: See TracChangeset for help on using the changeset viewer.