fix buttons missing type="button"

Triggers unintentional form submits if missing `type` property.
This commit is contained in:
Elijah Duffy
2025-08-18 18:40:44 -07:00
parent db081c93b7
commit 642ab24029
6 changed files with 16 additions and 2 deletions

View File

@@ -320,10 +320,17 @@
</div>
<div class="bg-sui-text/50 w-[1px] self-stretch"></div>
<div class="flex items-center gap-1">
<button class="item" title="Toggle Bold" aria-label="bold" {@attach boldToggle.attachment}>
<button
type="button"
class="item"
title="Toggle Bold"
aria-label="bold"
{@attach boldToggle.attachment}
>
<TextB size="1.25em" />
</button>
<button
type="button"
class="item"
title="Toggle Italic"
aria-label="italic"
@@ -332,6 +339,7 @@
<TextItalic size="1.25em" />
</button>
<button
type="button"
class="item"
title="Toggle Underline"
aria-label="underline"
@@ -340,6 +348,7 @@
<TextUnderline size="1.25em" />
</button>
<button
type="button"
class="item"
title="Toggle Strikethrough"
aria-label="strikethrough"
@@ -414,7 +423,7 @@
<input type="checkbox" id="darkmode" />
<label for="darkmode">Dark mode</label>
</div>
<button class="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600">
<button type="button" class="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600">
Save Changes
</button>
</form>