Skip to content

Commit a94eb01

Browse files
committed
feat: prevent dialogs from blocking password managers
closes #38
1 parent 2c559ca commit a94eb01

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/app/components/base/dialog/Dialog.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ watch(
4141
[toRef(props, 'open'), dialog],
4242
() => {
4343
if (props.open) {
44-
dialog.value?.showModal();
44+
dialog.value?.show();
4545
requestAnimationFrame(() => (visible.value = true));
4646
} else {
4747
visible.value = false;

src/app/components/base/form/TextField.vue

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:id="inputId"
77
ref="input"
88
v-model="modelValue"
9+
:name="name"
910
:minlength="minLength"
1011
:maxlength="maxLength"
1112
:required="required"
@@ -43,6 +44,7 @@ const modelValue = defineModel<string>();
4344
withDefaults(
4445
defineProps<{
4546
type?: 'text' | 'password';
47+
name?: string;
4648
minLength?: number;
4749
maxLength?: number;
4850
required?: boolean;

src/app/pages/navigation/auth/LoginDialog.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<Dialog :open="open" :title="t('navigation.auth.welcomeBack')" @close="emit('close')">
33
<Form :submit-label="t('navigation.auth.signIn')" @submit="signIn">
4-
<TextField v-model="username" required :label="t('navigation.auth.username')" type="text" />
5-
<TextField v-model="password" required :label="t('navigation.auth.password')" type="password" />
4+
<TextField v-model="username" required :label="t('navigation.auth.username')" type="text" name="username" />
5+
<TextField v-model="password" required :label="t('navigation.auth.password')" type="password" name="password" />
66
<Alert v-if="state === 'errored'" :text="t('navigation.auth.loginFailed')" type="error" />
77
</Form>
88
</Dialog>

0 commit comments

Comments
 (0)