Make WordPress Core

Changeset 29522


Ignore:
Timestamp:
08/17/2014 09:32:10 PM (12 years ago)
Author:
azaozz
Message:

Editor scrolling: always resize the text editor clone so it doesn't "push" the parent's width over 100%, fixes #29246.

File:
1 edited

Legend:

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

    r29495 r29522  
    3232                lastScrollPosition = 0,
    3333                pageYOffsetAtTop = 130,
    34                 pinnedToolsTop = 56, // also used in CSS for the "#poststuff #post-body #postbox-container-1.pinned" selector
    35                 textEditorClonePaddingTop = 37,
    36                 autoresizeMinHeight = 300; // $window.height() - 310;
     34                pinnedToolsTop = 56,
     35                autoresizeMinHeight = 300;
    3736
    3837        $textEditorClone.insertAfter( $textEditor );
     
    4241                'font-size': $textEditor.css( 'font-size' ),
    4342                'line-height': $textEditor.css( 'line-height' ),
    44                 'padding': $textEditor.css( 'padding' ),
    45                 'padding-top': textEditorClonePaddingTop,
    4643                'white-space': 'pre-wrap',
    4744                'word-wrap': 'break-word'
     
    439436                                        marginTop: $textTop.outerHeight()
    440437                                } );
    441                                 $textEditorClone.width( $textEditor.width() );
    442                         }
     438                        }
     439                        // ALways resize the clone so it doesn't "push" the parent width over 100%
     440                        $textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
    443441                }
    444442        }
Note: See TracChangeset for help on using the changeset viewer.