diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 922af669d1..67e8b1c065 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -2642,10 +2642,6 @@ img { -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important; } - #wpwrap { - background: #f0f0f0; - } - #wpcontent { position: relative; margin-left: 0; diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 883e6bd90e..b9d35611f6 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -11,7 +11,10 @@ if ( !defined('ABSPATH') ) die('-1'); wp_enqueue_script('post'); -wp_enqueue_script('editor-expand'); + +if ( post_type_supports( $post_type, 'editor' ) ) { + wp_enqueue_script('editor-expand'); +} if ( wp_is_mobile() ) wp_enqueue_script( 'jquery-touch-punch' ); diff --git a/src/wp-admin/js/editor-expand.js b/src/wp-admin/js/editor-expand.js index 37559eb6ff..e3260a71e6 100644 --- a/src/wp-admin/js/editor-expand.js +++ b/src/wp-admin/js/editor-expand.js @@ -285,7 +285,7 @@ jQuery( document ).ready( function($) { $top.css( { position: 'fixed', top: adminBarHeight + toolsHeight, - width: editorWidth - ( visual ? 0 : 38 ), + width: $editor.parent().width() - ( $top.outerWidth() - $top.width() ), borderTop: '1px solid #e5e5e5' } ); @@ -310,7 +310,6 @@ jQuery( document ).ready( function($) { $tools.css( { position: 'absolute', top: 0, - borderTop: 'none', width: $contentWrap.width() } ); // Handle scrolling down. @@ -319,14 +318,12 @@ jQuery( document ).ready( function($) { $top.css( { position: 'absolute', - top: window.pageYOffset - $editor.offset().top + adminBarHeight + $tools.outerHeight(), - borderTop: 'none' + top: editorHeight - buffer } ); $tools.css( { position: 'absolute', - top: window.pageYOffset - $contentWrap.offset().top + adminBarHeight, - borderTop: 'none', + top: editorHeight - buffer + 1, // border width: $contentWrap.width() } ); } diff --git a/src/wp-includes/css/editor.css b/src/wp-includes/css/editor.css index 3afd7d1e1c..b1dcbed849 100644 --- a/src/wp-includes/css/editor.css +++ b/src/wp-includes/css/editor.css @@ -756,7 +756,7 @@ i.mce-i-hr:before { position: relative; } -.wp-editor-tools { +#wp-content-editor-tools { background-color: #f1f1f1; padding-top: 20px; position: relative;