fix: prevent forms from entering infinite loops (closes issue #760) (#762)

This commit is contained in:
Greg Johnston 2023-03-30 16:28:49 -04:00 committed by GitHub
parent f42568d262
commit 16917997cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,7 @@ where
// POST
if method == "post" {
ev.prevent_default();
ev.stop_propagation();
let on_response = on_response.clone();
spawn_local(async move {
@ -144,6 +145,7 @@ where
.is_ok()
{
ev.prevent_default();
ev.stop_propagation();
}
}
};
@ -348,6 +350,7 @@ where
}
Ok(input) => {
ev.prevent_default();
ev.stop_propagation();
multi_action.dispatch(input);
if let Some(error) = error {
error.set(None);