Skip to content

Commit

Permalink
Prevent form from submitting when save is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Jan 8, 2024
1 parent 31d558b commit f838b9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/dialog/RevisionsDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@
{$_("dialogRevisionsDialog.controlLabel")}
</label>
<div class="buttons">
<Button on:click={() => onSave(enabled)}>{$_("dialog.save")}</Button
<Button
on:click={(event) => {
event.preventDefault();
onSave(enabled);
}}>{$_("dialog.save")}</Button
>
<Button secondary={true} on:click={onCancel}>
{$_("dialog.cancel")}
Expand Down

0 comments on commit f838b9c

Please sign in to comment.