Use jQuery.preventDefault instead of jQuery.stopImmediatePropagation. #250

wants to merge 1 commit into


None yet
3 participants

I ran across a bug with using the library on an iPad. With stopImmediatePropagation, even if an alert is canceled, the action is still completed. Using preventDefault corrects the problem.

All tests pass.


neerajdotname commented Mar 29, 2012

@lukeseelenbinder actually we need both stopImmediatePropagation and preventDefault.

preventDefault will let the event propagate.

Test case is missing it but a good test case for this scenario will check for both cases: clicking the link does not take user away. and clicking the link does not propagate.

Should I make those changes (use both methods), produce a test case, and resubmit the pull request?


neerajdotname commented Apr 1, 2012

@lukeseelenbinder yes.


JangoSteve commented Apr 2, 2012

@lukeseelenbinder no need to resubmit a pull request. If you make the changes and add a test case, you can force push to your branch and it will update this pull request.

I can't seem to pin down where (and I'm still figuring out how) I should write the tests. It seems that .stopEverything() is not getting called at all for a['data-confirm'] elements.


JangoSteve commented Apr 3, 2012

.stopEverything() gets called for a['data-confirm'] elements on line 302.

The test should go in the test/data-confirm.js file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment