Make WordPress Core

Changeset 31753


Ignore:
Timestamp:
03/12/2015 02:56:34 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Shiny Updates: Disable body scrolling when filesystem request modal is open.

props ericlewis.
fixes #31607.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/updates.js

    r31749 r31753  
    387387        if ( wp.updates.updateDoneSuccessfully === false ) {
    388388            wp.updates.updateLock = true;
    389             $('#request-filesystem-credentials-dialog').show();
     389            $( 'body' ).addClass( 'modal-open' );
     390            $( '#request-filesystem-credentials-dialog' ).show();
    390391        }
    391392    };
     
    394395    $( document ).ready( function() {
    395396        // File system credentials form submit noop-er / handler.
    396         $('#request-filesystem-credentials-dialog form').on( 'submit', function() {
     397        $( '#request-filesystem-credentials-dialog form' ).on( 'submit', function() {
    397398            // Persist the credentials input by the user for the duration of the page load.
    398399            wp.updates.filesystemCredentials.ftp.hostname = $('#hostname').val();
     
    403404            wp.updates.filesystemCredentials.ssh.privateKey = $('#private_key').val();
    404405
    405             $('#request-filesystem-credentials-dialog').hide();
     406            $( '#request-filesystem-credentials-dialog' ).hide();
     407            $( 'body' ).removeClass( 'modal-open' );
    406408
    407409            // Unlock and invoke the queue.
Note: See TracChangeset for help on using the changeset viewer.