WordPress.org

Make WordPress Core

Changeset 29075


Ignore:
Timestamp:
07/10/2014 07:35:32 PM (4 years ago)
Author:
helen
Message:

Editor scrolling:

  • Make sure the background color for tools is only applied to the main editor.
  • Fix toolbar width for smaller screens.
  • Ensure toolbar doesn't end up in a weird place when scrolling down too fast.
  • Avoid JS errors for post types that don't support the editor.

props avryl. see #28328.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r29041 r29075  
    26432643    }
    26442644
    2645     #wpwrap {
    2646         background: #f0f0f0;
    2647     }
    2648 
    26492645    #wpcontent {
    26502646        position: relative;
  • trunk/src/wp-admin/edit-form-advanced.php

    r29049 r29075  
    1212
    1313wp_enqueue_script('post');
    14 wp_enqueue_script('editor-expand');
     14
     15if ( post_type_supports( $post_type, 'editor' ) ) {
     16    wp_enqueue_script('editor-expand');
     17}
    1518
    1619if ( wp_is_mobile() )
  • trunk/src/wp-admin/js/editor-expand.js

    r29050 r29075  
    286286                position: 'fixed',
    287287                top: adminBarHeight + toolsHeight,
    288                 width: editorWidth - ( visual ? 0 : 38 ),
     288                width: $editor.parent().width() - ( $top.outerWidth() - $top.width() ),
    289289                borderTop: '1px solid #e5e5e5'
    290290            } );
     
    311311                    position: 'absolute',
    312312                    top: 0,
    313                     borderTop: 'none',
    314313                    width: $contentWrap.width()
    315314                } );
     
    320319                $top.css( {
    321320                    position: 'absolute',
    322                     top: window.pageYOffset - $editor.offset().top + adminBarHeight + $tools.outerHeight(),
    323                     borderTop: 'none'
     321                    top: editorHeight - buffer
    324322                } );
    325323
    326324                $tools.css( {
    327325                    position: 'absolute',
    328                     top: window.pageYOffset - $contentWrap.offset().top + adminBarHeight,
    329                     borderTop: 'none',
     326                    top: editorHeight - buffer + 1, // border
    330327                    width: $contentWrap.width()
    331328                } );
  • trunk/src/wp-includes/css/editor.css

    r29049 r29075  
    757757}
    758758
    759 .wp-editor-tools {
     759#wp-content-editor-tools {
    760760    background-color: #f1f1f1;
    761761    padding-top: 20px;
Note: See TracChangeset for help on using the changeset viewer.