-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiModal] Issue with Focus #6848
Comments
@cchaos @cee-chen @thompsongl @miukimiu |
@kartikrp We're actively working on fixing it. We found the cause and looking at possible working solutions at the moment |
Hi @kartikrp! We developed a fix for 3rd-party library we're using to control focus and we'll update it in EUI as soon as it's released. Thank you for your patience! |
@kartikrp As of the latest EUI release and upgrade to https://codesandbox.io/s/focus-issue-inside-modal-forked-mk9l55 All that was changed within the CodeSandbox fork was updating EUI to Hope that helps! |
Describe the bug
Our Team has recently made a shift from eui@67 to eui@76. The application we have built uses modals for form submissions a lot. While filling one of the forms, user can request for some specific data to be fetched from the server by clicking on a button provided in the form (this is not a footer button). When we click on this button the focus is lost from the button. The behaviour in eui@67 was as such that if you press tab, the focus will return to the next element present in the form (which is the expected behaviour, when someone presses tab in a form). But now in eui@76, whenever the focus is lost due to clicking on button for a request, and the tab is pressed, the focus returns to the close modal button in the modal heading(the cross button), which I guess is not the expected behaviour.
Environment and versions
Expected behavior
If by any means the focus in lost on an element in a form in a modal, it should return to the next element present and not the close button in the modal header(the cross button).
Minimum reproducible sandbox
https://codesandbox.io/s/focus-issue-inside-modal-5459fz
You can change the elastic/eui version in the sandbox to see the effect
The text was updated successfully, but these errors were encountered: