Make WordPress Core

Changeset 30977


Ignore:
Timestamp:
12/20/2014 07:33:01 PM (10 years ago)
Author:
azaozz
Message:

Editor: when switching editor-expand off for the first time use the default editor height. Props avryl, fixes #30760 for trunk.

File:
1 edited

Legend:

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

    r30890 r30977  
    683683
    684684        function off() {
    685             var height = window.getUserSetting('ed_size');
     685            var height = parseInt( window.getUserSetting( 'ed_size', 300 ), 10 );
     686
     687            if ( height < 50 ) {
     688                height = 50;
     689            } else if ( height > 5000 ) {
     690                height = 5000;
     691            }
    686692
    687693            // Scroll to the top when triggering this from JS.
Note: See TracChangeset for help on using the changeset viewer.