fix buttons missing type="button"
Triggers unintentional form submits if missing `type` property.
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
{id}
|
{id}
|
||||||
class={[
|
class={[
|
||||||
'text-sui-text flex size-7 appearance-none items-center',
|
'text-sui-text flex size-7 appearance-none items-center',
|
||||||
|
|||||||
@@ -219,6 +219,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
aria-label="close"
|
aria-label="close"
|
||||||
class="absolute top-4 right-4 inline-flex cursor-pointer items-center
|
class="absolute top-4 right-4 inline-flex cursor-pointer items-center
|
||||||
justify-center disabled:cursor-not-allowed disabled:opacity-50"
|
justify-center disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
|
|||||||
@@ -334,6 +334,7 @@
|
|||||||
<!-- Back button -->
|
<!-- Back button -->
|
||||||
{#if backButtonVisible}
|
{#if backButtonVisible}
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
class="text-sui-text hover:text-sui-text-700 dark:text-sui-background dark:hover:text-sui-background/80 flex cursor-pointer items-center
|
class="text-sui-text hover:text-sui-text-700 dark:text-sui-background dark:hover:text-sui-background/80 flex cursor-pointer items-center
|
||||||
gap-2.5 font-medium transition-colors"
|
gap-2.5 font-medium transition-colors"
|
||||||
onclick={() => (index -= 1)}
|
onclick={() => (index -= 1)}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
{#each pages as page, i (page.title)}
|
{#each pages as page, i (page.title)}
|
||||||
{@const active = activeIndex === i}
|
{@const active = activeIndex === i}
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
bind:this={refs[i]}
|
bind:this={refs[i]}
|
||||||
class={['-mb-[2px] cursor-pointer px-2']}
|
class={['-mb-[2px] cursor-pointer px-2']}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
bind:this={ref}
|
bind:this={ref}
|
||||||
{...others}
|
{...others}
|
||||||
class={[
|
class={[
|
||||||
|
|||||||
@@ -320,10 +320,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bg-sui-text/50 w-[1px] self-stretch"></div>
|
<div class="bg-sui-text/50 w-[1px] self-stretch"></div>
|
||||||
<div class="flex items-center gap-1">
|
<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" />
|
<TextB size="1.25em" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
class="item"
|
class="item"
|
||||||
title="Toggle Italic"
|
title="Toggle Italic"
|
||||||
aria-label="italic"
|
aria-label="italic"
|
||||||
@@ -332,6 +339,7 @@
|
|||||||
<TextItalic size="1.25em" />
|
<TextItalic size="1.25em" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
class="item"
|
class="item"
|
||||||
title="Toggle Underline"
|
title="Toggle Underline"
|
||||||
aria-label="underline"
|
aria-label="underline"
|
||||||
@@ -340,6 +348,7 @@
|
|||||||
<TextUnderline size="1.25em" />
|
<TextUnderline size="1.25em" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
class="item"
|
class="item"
|
||||||
title="Toggle Strikethrough"
|
title="Toggle Strikethrough"
|
||||||
aria-label="strikethrough"
|
aria-label="strikethrough"
|
||||||
@@ -414,7 +423,7 @@
|
|||||||
<input type="checkbox" id="darkmode" />
|
<input type="checkbox" id="darkmode" />
|
||||||
<label for="darkmode">Dark mode</label>
|
<label for="darkmode">Dark mode</label>
|
||||||
</div>
|
</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
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user