Skip to content
This repository
Browse code

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

…fires them
  • Loading branch information...
commit 8409edbdc937abe297f0cb972ab73fe7a57fdcd1 1 parent f22f74a
Steve Schwartz JangoSteve authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 test/public/test/call-remote-callbacks.js
5 test/public/test/call-remote-callbacks.js
@@ -11,6 +11,7 @@ module('call-remote-callbacks', {
11 11 $(document).undelegate('form[data-remote]', 'ajax:before');
12 12 $(document).undelegate('form[data-remote]', 'ajax:complete');
13 13 $(document).undelegate('form[data-remote]', 'ajax:success');
  14 + $(document).unbind('ajaxStop');
14 15 }
15 16 });
16 17
@@ -101,7 +102,7 @@ asyncTest('stopping the "ajax:beforeSend" event aborts the request', 1, function
101 102 form.bind('ajax:error', function(e, xhr, status, error) {
102 103 ok(false, 'ajax:error should not run');
103 104 });
104   - form.bind('ajaxStop', function() {
  105 + $(document).bind('ajaxStop', function() {
105 106 start();
106 107 });
107 108 });
@@ -313,7 +314,7 @@ asyncTest('"ajax:beforeSend" can be observed and stopped with event delegation',
313 314 form.unbind('ajax:complete').bind('ajax:complete', function() {
314 315 ok(false, 'ajax:complete should not run');
315 316 });
316   - form.bind('ajaxStop', function() {
  317 + $(document).bind('ajaxStop', function() {
317 318 start();
318 319 });
319 320 });

0 comments on commit 8409edb

Please sign in to comment.
Something went wrong with that request. Please try again.