Use jQuery.preventDefault instead of jQuery.stopImmediatePropagation.#250
Use jQuery.preventDefault instead of jQuery.stopImmediatePropagation.#250lseelenbinder wants to merge 1 commit intorails:masterfrom
Conversation
|
@lukeseelenbinder actually we need both
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? |
|
@lukeseelenbinder yes. |
|
@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 |
|
The test should go in the test/data-confirm.js file. |
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.