Permalink
Browse files

Rebound instances of ajaxStop to document, where jquery 1.9 now only …

…fires them
  • Loading branch information...
1 parent f22f74a commit 8409edbdc937abe297f0cb972ab73fe7a57fdcd1 @JangoSteve JangoSteve committed Jan 18, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/public/test/call-remote-callbacks.js
View
5 test/public/test/call-remote-callbacks.js
@@ -11,6 +11,7 @@ module('call-remote-callbacks', {
$(document).undelegate('form[data-remote]', 'ajax:before');
$(document).undelegate('form[data-remote]', 'ajax:complete');
$(document).undelegate('form[data-remote]', 'ajax:success');
+ $(document).unbind('ajaxStop');
}
});
@@ -101,7 +102,7 @@ asyncTest('stopping the "ajax:beforeSend" event aborts the request', 1, function
form.bind('ajax:error', function(e, xhr, status, error) {
ok(false, 'ajax:error should not run');
});
- form.bind('ajaxStop', function() {
+ $(document).bind('ajaxStop', function() {
start();
});
});
@@ -313,7 +314,7 @@ asyncTest('"ajax:beforeSend" can be observed and stopped with event delegation',
form.unbind('ajax:complete').bind('ajax:complete', function() {
ok(false, 'ajax:complete should not run');
});
- form.bind('ajaxStop', function() {
+ $(document).bind('ajaxStop', function() {
start();
});
});

0 comments on commit 8409edb

Please sign in to comment.