Permalink
Browse files

The event listener is now attached to the form, not the button. Since…

… triggerHandler() doesn't bubble up, so we have use trigger() instead, passing a manually created event.
  • Loading branch information...
1 parent 42046d9 commit fdb86837c7c71c0347c18e789c5fb68c71c5377f Felix Gnass committed Oct 28, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/test.js
View
@@ -217,7 +217,9 @@ test("submitHandler keeps submitting button", function() {
});
$("#username").val("bla");
var button = $("#userForm :submit")[0]
- $(button).triggerHandler("click");
+ var event = $.Event("click");
+ event.preventDefault();
+ $.event.trigger(event, null, button);
$("#userForm").submit();
});

0 comments on commit fdb8683

Please sign in to comment.