Skip to content

Conversation

mkazlauskas
Copy link
Member

A unit test in lace was failing after replacing Password with this component. Tested it with this change.

Copy link

@@ -68,6 +69,7 @@ export const UncontrolledPasswordInput = ({
type={isPasswordVisible ? 'text' : 'password'}
required={required}
placeholder=""
autoFocus={autoFocus}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with it as an interim solution but I have to point out that this technically may not work 100% of the time: https://blog.logrocket.com/how-to-autofocus-using-react-hooks/

@mkazlauskas mkazlauskas merged commit 9c7dac0 into main Aug 13, 2024
3 checks passed
@mkazlauskas mkazlauskas deleted the fix/uncontrolled-pw-autofocus branch August 13, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants