Make WordPress Core

Changeset 27015 for trunk


Ignore:
Timestamp:
01/22/2014 09:25:05 PM (11 years ago)
Author:
azaozz
Message:

Autosave: don't set "submit" buttons to disabled right before submitting the form. They are not sent with the form data, see #25272.

File:
1 edited

Legend:

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

    r27003 r27015  
    405405        var $button = $(this);
    406406
    407         if ( $button.prop('disabled') ) {
     407        if ( $button.hasClass('button-disabled') ) {
    408408            event.preventDefault();
    409409            return;
     
    428428            $(window).off( 'beforeunload.edit-post' );
    429429
    430             $submitButtons.prop( 'disabled', true ).addClass( 'button-disabled' );
     430            $submitButtons.addClass( 'button-disabled' );
    431431
    432432            if ( $button.attr('id') === 'publish' ) {
     
    501501
    502502    $(document).on( 'autosave-disable-buttons.edit-post', function() {
    503         $submitButtons.prop( 'disabled', true ).addClass( 'button-disabled' );
     503        $submitButtons.addClass( 'button-disabled' );
    504504    }).on( 'autosave-enable-buttons.edit-post', function() {
    505505        if ( ! window.wp || ! window.wp.heartbeat || ! window.wp.heartbeat.hasConnectionError() ) {
    506             $submitButtons.prop( 'disabled', false ).removeClass( 'button-disabled' );
     506            $submitButtons.removeClass( 'button-disabled' );
    507507        }
    508508    });
Note: See TracChangeset for help on using the changeset viewer.