Editor scrolling: always resize the text editor clone so it doesn't "push" the parent's width over 100%, fixes #29246.
Built from https://develop.svn.wordpress.org/trunk@29522 git-svn-id: http://core.svn.wordpress.org/trunk@29298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aff2892646
commit
4fc5f9bcca
|
@ -31,9 +31,8 @@ jQuery( document ).ready( function($) {
|
|||
scrollTimer,
|
||||
lastScrollPosition = 0,
|
||||
pageYOffsetAtTop = 130,
|
||||
pinnedToolsTop = 56, // also used in CSS for the "#poststuff #post-body #postbox-container-1.pinned" selector
|
||||
textEditorClonePaddingTop = 37,
|
||||
autoresizeMinHeight = 300; // $window.height() - 310;
|
||||
pinnedToolsTop = 56,
|
||||
autoresizeMinHeight = 300;
|
||||
|
||||
$textEditorClone.insertAfter( $textEditor );
|
||||
|
||||
|
@ -41,8 +40,6 @@ jQuery( document ).ready( function($) {
|
|||
'font-family': $textEditor.css( 'font-family' ),
|
||||
'font-size': $textEditor.css( 'font-size' ),
|
||||
'line-height': $textEditor.css( 'line-height' ),
|
||||
'padding': $textEditor.css( 'padding' ),
|
||||
'padding-top': textEditorClonePaddingTop,
|
||||
'white-space': 'pre-wrap',
|
||||
'word-wrap': 'break-word'
|
||||
} );
|
||||
|
@ -438,8 +435,9 @@ jQuery( document ).ready( function($) {
|
|||
$textEditor.css( {
|
||||
marginTop: $textTop.outerHeight()
|
||||
} );
|
||||
$textEditorClone.width( $textEditor.width() );
|
||||
}
|
||||
// ALways resize the clone so it doesn't "push" the parent width over 100%
|
||||
$textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue