mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-30 20:21:37 +01:00
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: http://svn.automattic.com/wordpress/trunk@19258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a37b440bac
commit
ca9e43f1c4
@ -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
Block a user