Make WordPress Core

Ticket #30668: 30668.patch

File 30668.patch, 1.3 KB (added by iseulde, 11 years ago)
  • src/wp-admin/js/editor-expand.js

     
    937937                                        } )
    938938                                        // Fade in when the mouse moves away form the editor area.
    939939                                        .on( 'mousemove.focus', function( event ) {
    940                                                 var nx = event.pageX,
    941                                                         ny = event.pageY;
     940                                                var nx = event.clientX,
     941                                                        ny = event.clientY,
     942                                                        pageYOffset = window.pageYOffset;
    942943
    943944                                                if ( x && y && ( nx !== x || ny !== y ) ) {
    944945                                                        if (
    945                                                                 ( ny <= y && ny < editorRect.top ) ||
    946                                                                 ( ny >= y && ny > editorRect.bottom ) ||
     946                                                                ( ny <= y && ny < editorRect.top + pageYOffset ) ||
     947                                                                ( ny >= y && ny > editorRect.bottom + pageYOffset ) ||
    947948                                                                ( nx <= x && nx < editorRect.left ) ||
    948949                                                                ( nx >= x && nx > editorRect.right )
    949950                                                        ) {
     
    951952                                                                traveledY += Math.abs( y - ny );
    952953
    953954                                                                if ( (
    954                                                                         ny <= editorRect.top - buffer ||
    955                                                                         ny >= editorRect.bottom + buffer ||
     955                                                                        ny <= editorRect.top - buffer + pageYOffset ||
     956                                                                        ny >= editorRect.bottom + buffer + pageYOffset ||
    956957                                                                        nx <= editorRect.left - buffer ||
    957958                                                                        nx >= editorRect.right + buffer
    958959                                                                ) && (