Editor scrolling: always resize the text editor clone so it doesn't "push" the parent's width over 100%, fixes #29246.
git-svn-id: https://develop.svn.wordpress.org/trunk@29522 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ed01241d4b
commit
53488d1404
|
@ -31,9 +31,8 @@ jQuery( document ).ready( function($) {
|
||||||
scrollTimer,
|
scrollTimer,
|
||||||
lastScrollPosition = 0,
|
lastScrollPosition = 0,
|
||||||
pageYOffsetAtTop = 130,
|
pageYOffsetAtTop = 130,
|
||||||
pinnedToolsTop = 56, // also used in CSS for the "#poststuff #post-body #postbox-container-1.pinned" selector
|
pinnedToolsTop = 56,
|
||||||
textEditorClonePaddingTop = 37,
|
autoresizeMinHeight = 300;
|
||||||
autoresizeMinHeight = 300; // $window.height() - 310;
|
|
||||||
|
|
||||||
$textEditorClone.insertAfter( $textEditor );
|
$textEditorClone.insertAfter( $textEditor );
|
||||||
|
|
||||||
|
@ -41,8 +40,6 @@ jQuery( document ).ready( function($) {
|
||||||
'font-family': $textEditor.css( 'font-family' ),
|
'font-family': $textEditor.css( 'font-family' ),
|
||||||
'font-size': $textEditor.css( 'font-size' ),
|
'font-size': $textEditor.css( 'font-size' ),
|
||||||
'line-height': $textEditor.css( 'line-height' ),
|
'line-height': $textEditor.css( 'line-height' ),
|
||||||
'padding': $textEditor.css( 'padding' ),
|
|
||||||
'padding-top': textEditorClonePaddingTop,
|
|
||||||
'white-space': 'pre-wrap',
|
'white-space': 'pre-wrap',
|
||||||
'word-wrap': 'break-word'
|
'word-wrap': 'break-word'
|
||||||
} );
|
} );
|
||||||
|
@ -438,8 +435,9 @@ jQuery( document ).ready( function($) {
|
||||||
$textEditor.css( {
|
$textEditor.css( {
|
||||||
marginTop: $textTop.outerHeight()
|
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 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue