Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoFocus={true} seems to not be added to the input element #12

Closed
jasikpark opened this issue Jan 11, 2022 · 1 comment
Closed

autoFocus={true} seems to not be added to the input element #12

jasikpark opened this issue Jan 11, 2022 · 1 comment

Comments

@jasikpark
Copy link
Contributor

As you can see in Edit rci – CodeInput (forked)

I edited the example to set <Example id={a11yId} expected={expected} autoFocus={true}/> but there is no autofocus attribute on the input on load.

@axelmarciano
Copy link
Contributor

axelmarciano commented Jan 12, 2022

In React, autofocus!== autoFocus.
If you use the autofocus props you will use the html props but with autoFocus the focus() method will be called when the component mounts.
If you want to learn more: facebook/react#11851 (comment)

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

No branches or pull requests

2 participants