fix: Fixed issue where the first input in the challenge modal would get focused when typing in another input
This commit is contained in:
@@ -49,9 +49,15 @@ const ChallengeModalPrompt: FunctionComponent<Props> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
biometricsButtonRef.current?.click()
|
biometricsButtonRef.current?.click()
|
||||||
} else {
|
return
|
||||||
inputRef.current?.focus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const parentForm = inputRef.current?.closest('form')
|
||||||
|
if (parentForm?.contains(document.activeElement)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
inputRef.current?.focus()
|
||||||
}, [application, prompt.id, prompt.validation, values])
|
}, [application, prompt.id, prompt.validation, values])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user