fix properties on email inputs

This commit is contained in:
2023-05-20 20:46:37 +10:00
parent e023964cb2
commit 0e7c86ac2b
6 changed files with 15 additions and 6 deletions

View File

@@ -157,7 +157,16 @@
:type="props.type" :type="props.type"
class="input-control" class="input-control"
:disabled="disabled" :disabled="disabled"
v-bind="{ id: id, autofocus: props.autofocus }" v-bind="{
id: id,
autofocus: props.autofocus,
autocomplete:
props.type === 'email' ? 'email' : null,
spellcheck: props.type === 'email' ? false : null,
autocorrect: props.type === 'email' ? 'on' : null,
autocapitalize:
props.type === 'email' ? 'off' : null,
}"
v-model="value" v-model="value"
@focus="handleFocus" @focus="handleFocus"
@blur="handleBlur" @blur="handleBlur"

View File

@@ -8,7 +8,7 @@
Enter your email below to receive a password reset link. Enter your email below to receive a password reset link.
</p> </p>
<SMForm v-model="form" @submit="handleSubmit"> <SMForm v-model="form" @submit="handleSubmit">
<SMInput control="email" /> <SMInput control="email" type="email" autofocus />
<SMButtonRow> <SMButtonRow>
<template #left> <template #left>
<div class="small"> <div class="small">

View File

@@ -9,7 +9,7 @@
</p> </p>
</template> </template>
<template #body> <template #body>
<SMInput control="email" autofocus> </SMInput> <SMInput control="email" autofocus type="email"> </SMInput>
<SMInput control="password" type="password"> <SMInput control="password" type="password">
<router-link to="/forgot-password" <router-link to="/forgot-password"
>Forgot password?</router-link >Forgot password?</router-link

View File

@@ -11,7 +11,7 @@
</template> </template>
<template #body> <template #body>
<SMFormError v-model="form" /> <SMFormError v-model="form" />
<SMInput control="email" autofocus /> <SMInput control="email" autofocus type="email" />
<SMInput control="password" type="password" /> <SMInput control="password" type="password" />
<SMInput control="display_name" label="Display Name" /> <SMInput control="display_name" label="Display Name" />
</template> </template>

View File

@@ -11,7 +11,7 @@
</p> </p>
</template> </template>
<template #body> <template #body>
<SMInput control="email" /> <SMInput control="email" type="email" />
</template> </template>
<template #footer> <template #footer>
<SMButtonRow> <SMButtonRow>

View File

@@ -23,7 +23,7 @@
<SMColumn><SMInput control="last_name" /></SMColumn> <SMColumn><SMInput control="last_name" /></SMColumn>
</SMRow> </SMRow>
<SMRow> <SMRow>
<SMColumn><SMInput control="email" /></SMColumn> <SMColumn><SMInput control="email" type="email" /></SMColumn>
<SMColumn <SMColumn
><SMInput control="phone" ><SMInput control="phone"
><template #help ><template #help