Make WordPress Core

Ticket #30366: 30366.6.patch

File 30366.6.patch, 861 bytes (added by honeysilvas, 10 years ago)

Patch for jumping sidebar when scrolling to bottom.

  • src/wp-content/themes/twentyfifteen/js/functions.js

     
    7474                                                topOffset = ( $sidebar.offset().top > 0 ) ? $sidebar.offset().top - adminbarOffset : 0;
    7575                                                $sidebar.attr( 'style', 'top: ' + topOffset + 'px;' );
    7676                                        } else if ( ! bottom && windowPos + windowHeight > sidebarHeight + $sidebar.offset().top ) {
    77                                                 bottom = true;
    78                                                 $sidebar.attr( 'style', 'position: fixed;bottom: 0;' );
     77                                                if ( $document.height() != sidebarHeight ){
     78                                                        bottom = true;
     79                                                        $sidebar.attr( 'style', 'position: fixed;bottom: 0;' );
     80                                                }       
    7981                                        }
    8082                                } else if ( windowPos < lastWindowPos ) {
    8183                                        if ( bottom ) {