Skip to content

Conversation

@mokhosh
Copy link

@mokhosh mokhosh commented Oct 18, 2024

Salaam @hasan-ahani

The current JS method for focusing the element doesn't work in some situations and creates accessibility issues.
Sometimes I get this in the console:

Autofocus processing was blocked because a document already has a focused element.

And it won't work inside a Filament Wizard because they will check for autofocus attributes on child elements of a Step.

This PR fixes the issue by adding autofocus to the first element if autofocus is set to true on the component.

@mokhosh
Copy link
Author

mokhosh commented Oct 18, 2024

Also, would you be willing to merge PRs for code style fixes and refactors?

@hasan-ahani
Copy link
Owner

Hi @mokhosh ,

Thank you for the detailed explanation and the fixes in this pull request. I understand the autofocus issue you mentioned and the console error. Your proposed solution seems logical and efficient. I’ll review and test the changes.

Regarding pull requests for code style fixes and refactors, yes, I’d be happy to review and merge those as well.

Thanks for your contribution!

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.

2 participants