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 on Input throws error: Cannot read properties of undefined (reading 'onFocus') #381

Closed
denno020 opened this issue Jan 25, 2022 · 1 comment

Comments

@denno020
Copy link

Describe the bug
When making use of the autoFocus attribute in order to force focus to a form input, an error is thrown, however the feature still seems to work.

The error thrown is: Cannot read properties of undefined (reading 'onFocus'), and it seems to come from line 362 in FormController.js

To Reproduce

This sandbox will initially just contain a Toggle button. Click on that button and the form will be rendered, which is when the autoFocus attribute will take effect. We can see that the input is actually focused as we want it to, however there is a big error that is also thrown

https://codesandbox.io/s/informed-js-autofocus-bug-1lxwt

@joepuzzo
Copy link
Collaborator

Fixed in latest version! Thanks

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