Send the 'wp-remove-post-lock' XHR only when the main window is unloaded (unloading the Thickbox iframe triggers it too), see #18515
git-svn-id: https://develop.svn.wordpress.org/trunk@19258 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7334506df0
commit
93e5c50ad8
|
@ -48,9 +48,14 @@ jQuery(document).ready( function($) {
|
|||
}
|
||||
};
|
||||
|
||||
$(window).unload( function() {
|
||||
$(window).unload( function(e) {
|
||||
if ( ! autosaveLockRelease )
|
||||
return;
|
||||
|
||||
// unload fires (twice) on removing the Thickbox iframe. Make sure we process only the main document unload.
|
||||
if ( e.target && e.target.nodeName != '#document' )
|
||||
return;
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -101,7 +101,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'close' => __('Close'),
|
||||
) );
|
||||
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20111013', 1 );
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20111111', 1 );
|
||||
|
||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20110521', 1 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue