Editor scrolling: set max-width: 100% for the text editor clone instead of always resizing it. See #29246.

git-svn-id: https://develop.svn.wordpress.org/trunk@29524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-18 01:12:31 +00:00
parent dcba23a58e
commit 27cd1b4f92
3 changed files with 6 additions and 5 deletions

View File

@ -385,6 +385,7 @@ td.plugin-title p {
top: 0;
visibility: hidden;
overflow: hidden;
max-width: 100%;
}
.wp-fullscreen-wrap #content-textarea-clone {

View File

@ -91,7 +91,7 @@ jQuery( document ).ready( function($) {
var textEditorHeight = $textEditor.height(),
hiddenHeight;
$textEditorClone.width( $textEditor.width() );
$textEditorClone.width( $textEditor.width() - 22 );
$textEditorClone.text( $textEditor.val() + ' ' );
hiddenHeight = $textEditorClone.height();
@ -461,9 +461,9 @@ jQuery( document ).ready( function($) {
$textEditor.css( {
marginTop: $textTop.outerHeight()
} );
$textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
}
// ALways resize the clone so it doesn't "push" the parent width over 100%
$textEditorClone.width( contentWrapWidth - 20 - ( borderWidth * 2 ) );
}
}

View File

@ -49,11 +49,11 @@ var postboxes;
if ( $(this).prop('checked') ) {
$postbox.show();
if ( $.isFunction( postboxes.pbshow ) )
self.pbshow( box );
self.pbshow( boxId );
} else {
$postbox.hide();
if ( $.isFunction( postboxes.pbhide ) )
self.pbhide( box );
self.pbhide( boxId );
}
self.save_state(page);
self._mark_area();