Make WordPress Core

Changeset 27003


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

Autosave: don't disable the buttons on previewing a post, see #25272.

File:
1 edited

Legend:

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

    r26995 r27003  
    402402
    403403    // The form is being submitted by the user
    404     $submitButtons = $submitpost.find( ':button, :submit, a.submitdelete, #post-preview' ).on( 'click.autosave', function( event ) {
     404    $submitButtons = $submitpost.find( ':button, :submit, a.submitdelete, #post-preview' ).on( 'click.edit-post', function( event ) {
    405405        var $button = $(this);
    406406
     
    410410        }
    411411
    412         if ( $button.hasClass('submitdelete') ) {
     412        if ( $button.hasClass('submitdelete') || $button.is( '#post-preview' ) ) {
    413413            return;
    414414        }
     
    421421            }
    422422
    423             wp.autosave.server.disable();
     423            if ( typeof wp != 'undefined' && wp.autosave ) {
     424                wp.autosave.server.disable();
     425            }
     426
    424427            releaseLock = false;
    425428            $(window).off( 'beforeunload.edit-post' );
Note: See TracChangeset for help on using the changeset viewer.