Ticket #25696: 25696.2.patch
File 25696.2.patch, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/inline-edit-post.js
51 51 // add events 52 52 $('#the-list').on( 'click', 'a.editinline', function( e ) { 53 53 e.preventDefault(); 54 // Don't open a new Quick Edit form when a previous Quick Edit request has not completed yet. 55 if ( inlineEditPost.xhr && inlineEditPost.xhr.readyState !== 4 ) { 56 return; 57 } 54 58 inlineEditPost.edit(this); 55 59 }); 56 60 … … 270 274 fields = $('#edit-'+id).find(':input').serialize(); 271 275 params = fields + '&' + $.param(params); 272 276 273 // make ajax request 274 $.post( ajaxurl, params, 277 // Abort the AJAX request if there's already one in progress. 278 if ( inlineEditPost.xhr && inlineEditPost.xhr.readyState !== 4 ) { 279 inlineEditPost.xhr.abort(); 280 } 281 282 // Fire the AJAX request. 283 inlineEditPost.xhr = $.post( ajaxurl, params, 275 284 function(r) { 276 285 var $errorSpan = $( '#edit-' + id + ' .inline-edit-save .error' ); 277 286 … … 325 334 } 326 335 } 327 336 337 if ( inlineEditPost.xhr && inlineEditPost.xhr.readyState !== 4 ) { 338 inlineEditPost.xhr.abort(); 339 inlineEditPost.xhr = null; 340 } 341 328 342 return false; 329 343 }, 330 344