Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit fe18ea9

Browse files
committed
fix(ngForm): don't block submit when method=dialog
When a form's method is set to "dialog" it does not post to a server but instead closes the nearest parent <dialog> element. An action is not required.
1 parent 4dd10fd commit fe18ea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/directive/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ var formDirectiveFactory = function(isNgForm) {
485485
var controller = ctrls[0];
486486

487487
// if `action` attr is not present on the form, prevent the default action (submission)
488-
if (!('action' in attr)) {
488+
if (!('action' in attr) && attr['method'] !== 'dialog') {
489489
// we can't use jq events because if a form is destroyed during submission the default
490490
// action is not prevented. see #1238
491491
//

0 commit comments

Comments
 (0)