Skip to content

Commit 574f9fc

Browse files
committed
fix(ui): prevent default on click toggle button
1 parent 4b1a1f7 commit 574f9fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/shared/components/ui/password-input/password-input.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
type={showPassword ? 'text' : 'password'} />
2121
<button
2222
class="absolute right-3 top-3"
23-
onclick={toggleShowPassword}>
23+
onclick={(event: MouseEvent) => {
24+
event.preventDefault();
25+
toggleShowPassword(event);
26+
}}>
2427
{#if showPassword}
2528
<Eye size="16" />
2629
{:else}

0 commit comments

Comments
 (0)