mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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
|
||||
$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);
|
||||
|
||||
if ( $button.prop('disabled') ) {
|
||||
@ -409,7 +409,7 @@ jQuery(document).ready( function($) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $button.hasClass('submitdelete') ) {
|
||||
if ( $button.hasClass('submitdelete') || $button.is( '#post-preview' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -420,7 +420,10 @@ jQuery(document).ready( function($) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp.autosave.server.disable();
|
||||
if ( typeof wp != 'undefined' && wp.autosave ) {
|
||||
wp.autosave.server.disable();
|
||||
}
|
||||
|
||||
releaseLock = false;
|
||||
$(window).off( 'beforeunload.edit-post' );
|
||||
|
||||
|
2
wp-admin/js/post.min.js
vendored
2
wp-admin/js/post.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user