GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

formmethod on submit button in form is not respected. #178

Closed AdaRoseCannon closed 4 years ago

AdaRoseCannon commented 5 years ago

Forms with an <input type="submit" value="Confirm" formmethod="post" formaction="/sponsorship" formenctype="multipart/form-data" /> should submit the form rather than close the dialog.

Currently because of `ev.preventDefault()' in the 'submit' eventlistener it prevents the form being submitted.

Current Behaviour: Dialog closes.

Expected Behaviour: Form should be posted to the URL.

samthor commented 4 years ago

I've fixed this in 0.5.4; we prefer the method specified in formmethod on the submitter of forms.