feat:support use tab change focus between inputs at login page

This commit is contained in:
NFish 2024-09-23 10:01:22 +08:00
parent badcf56171
commit c5fa49a6c0

View File

@ -81,6 +81,7 @@ export default function MailAndPasswordAuth({ isInvite }: MailAndPasswordAuthPro
type="email" type="email"
autoComplete="email" autoComplete="email"
placeholder={t('login.emailPlaceholder') || ''} placeholder={t('login.emailPlaceholder') || ''}
tabIndex={1}
/> />
</div> </div>
</div> </div>
@ -104,6 +105,7 @@ export default function MailAndPasswordAuth({ isInvite }: MailAndPasswordAuthPro
type={showPassword ? 'text' : 'password'} type={showPassword ? 'text' : 'password'}
autoComplete="current-password" autoComplete="current-password"
placeholder={t('login.passwordPlaceholder') || ''} placeholder={t('login.passwordPlaceholder') || ''}
tabIndex={2}
/> />
<div className="absolute inset-y-0 right-0 flex items-center pr-3"> <div className="absolute inset-y-0 right-0 flex items-center pr-3">
<Button <Button
@ -119,7 +121,7 @@ export default function MailAndPasswordAuth({ isInvite }: MailAndPasswordAuthPro
<div className='mb-2'> <div className='mb-2'>
<Button <Button
tabIndex={0} tabIndex={2}
variant='primary' variant='primary'
onClick={handleEmailPasswordLogin} onClick={handleEmailPasswordLogin}
disabled={isLoading} disabled={isLoading}