For an intermittent connection, only disable save and publish buttons when the request times out. An error still means a we have a connection.
props azaozz. see #24695. git-svn-id: https://develop.svn.wordpress.org/trunk@24691 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3275463453
commit
cbc7814345
@ -142,12 +142,14 @@ jQuery(document).ready( function($) {
|
||||
}
|
||||
|
||||
// When connection is lost, keep user from submitting changes.
|
||||
$(document).on('heartbeat-connection-lost.autosave', function() {
|
||||
autosave_disable_buttons();
|
||||
$('#lost-connection-notice').show();
|
||||
$(document).on('heartbeat-connection-lost.autosave', function( e, error ) {
|
||||
if ( 'timeout' === error ) {
|
||||
$('#lost-connection-notice').show();
|
||||
autosave_disable_buttons();
|
||||
}
|
||||
}).on('heartbeat-connection-restored.autosave', function() {
|
||||
autosave_enable_buttons();
|
||||
$('#lost-connection-notice').hide();
|
||||
autosave_enable_buttons();
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user