mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
dialog_widget: Prevent default action when submitting the form.
We should prevent the default html behavior when submitting the forms in the dialog_widgets to avoid reloading the whole page when the user clicks the submit button. Fixes: #26104
This commit is contained in:
@@ -190,6 +190,8 @@ export function launch(conf: DialogWidgetConfig): void {
|
||||
|
||||
// Set up handlers.
|
||||
$submit_button.on("click", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (conf.validate_input && !conf.validate_input(e)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user