Autosave: don't disable the buttons on previewing a post, see #25272.
Built from https://develop.svn.wordpress.org/trunk@27003 git-svn-id: http://core.svn.wordpress.org/trunk@26880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f6b1f2202a
commit
97afd9c251
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
wp.autosave.server.disable();
|
if ( typeof wp != 'undefined' && wp.autosave ) {
|
||||||
|
wp.autosave.server.disable();
|
||||||
|
}
|
||||||
|
|
||||||
releaseLock = false;
|
releaseLock = false;
|
||||||
$(window).off( 'beforeunload.edit-post' );
|
$(window).off( 'beforeunload.edit-post' );
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue