fix: do not submit `<ActionForm>` on `formmethod="dialog"` submission (closes #2523)
This commit is contained in:
parent
9a51fb17fc
commit
fe06c6b91b
|
@ -488,6 +488,17 @@ where
|
|||
return;
|
||||
}
|
||||
|
||||
// <button formmethod="dialog"> should *not* dispatch the action, but should be allowed to
|
||||
// just bubble up and close the <dialog> naturally
|
||||
let is_dialog = ev
|
||||
.submitter()
|
||||
.and_then(|el| el.get_attribute("formmethod"))
|
||||
.as_deref()
|
||||
== Some("dialog");
|
||||
if is_dialog {
|
||||
return;
|
||||
}
|
||||
|
||||
ev.prevent_default();
|
||||
|
||||
match ServFn::from_event(&ev) {
|
||||
|
|
Loading…
Reference in New Issue