Skip to content

Commit d7ca753

Browse files
committed
Remove checking event.preventDefault and calling event.returnValue. Related to issue angular#4557. Worked with @bullwrinkle on this.
1 parent 764fa86 commit d7ca753

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ng/directive/form.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -465,15 +465,15 @@ var formDirectiveFactory = function(isNgForm) {
465465
// IE 9 is not affected because it doesn't fire a submit event and try to do a full
466466
// page reload if the form was destroyed by submission of the form via a click handler
467467
// on a button in the form. Looks like an IE9 specific bug.
468+
//
469+
// Checking event.preventDefault and calling event.returnValue were removed.
468470
var handleFormSubmission = function(event) {
469471
scope.$apply(function() {
470472
controller.$commitViewValue();
471473
controller.$setSubmitted();
472474
});
473475

474-
event.preventDefault
475-
? event.preventDefault()
476-
: event.returnValue = false; // IE
476+
event.preventDefault();
477477
};
478478

479479
addEventListenerFn(formElement[0], 'submit', handleFormSubmission);

0 commit comments

Comments
 (0)