Make WordPress Core

Ticket #37790: sticky.diff

File sticky.diff, 866 bytes (added by tomdxw, 10 years ago)
  • wp-admin/js/editor-expand.js

    diff --git a/wp-admin/js/editor-expand.js b/wp-admin/js/editor-expand.js
    index bf67c64..f1b3caa 100644
    a b  
    467467                        // Sidebar pinning
    468468                        if ( $postboxContainer.width() < 300 && heights.windowWidth > 600 && // sidebar position is changed with @media from CSS, make sure it is on the side
    469469                                $document.height() > ( $sideSortables.height() + postBodyTop + 120 ) && // the sidebar is not the tallest element
    470                                 heights.windowHeight < editorHeight ) { // the editor is taller than the viewport
     470                                heights.windowHeight < $('#poststuff').outerHeight() ) { // the page content is taller than the viewport
    471471
    472472                                if ( ( heights.sideSortablesHeight + pinnedToolsTop + sidebarBottom ) > heights.windowHeight || fixedSideTop || fixedSideBottom ) {
    473473                                        // Reset when scrolling to the top