Autosave: don't disable the buttons on previewing a post, see #25272.
git-svn-id: https://develop.svn.wordpress.org/trunk@27003 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ba1c9e0c22
commit
db64b3d951
@ -401,7 +401,7 @@ jQuery(document).ready( function($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The form is being submitted by the user
|
// The form is being submitted by the user
|
||||||
$submitButtons = $submitpost.find( ':button, :submit, a.submitdelete, #post-preview' ).on( 'click.autosave', function( event ) {
|
$submitButtons = $submitpost.find( ':button, :submit, a.submitdelete, #post-preview' ).on( 'click.edit-post', function( event ) {
|
||||||
var $button = $(this);
|
var $button = $(this);
|
||||||
|
|
||||||
if ( $button.prop('disabled') ) {
|
if ( $button.prop('disabled') ) {
|
||||||
@ -409,7 +409,7 @@ jQuery(document).ready( function($) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $button.hasClass('submitdelete') ) {
|
if ( $button.hasClass('submitdelete') || $button.is( '#post-preview' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,7 +420,10 @@ jQuery(document).ready( function($) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( typeof wp != 'undefined' && wp.autosave ) {
|
||||||
wp.autosave.server.disable();
|
wp.autosave.server.disable();
|
||||||
|
}
|
||||||
|
|
||||||
releaseLock = false;
|
releaseLock = false;
|
||||||
$(window).off( 'beforeunload.edit-post' );
|
$(window).off( 'beforeunload.edit-post' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user