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
Give focus to modal buttons when clicked #5266
Comments
This might make sense, but I didn't test much. Another option could be to just remove the focus from other input fields when opening the library. |
The focus should be moved to whichever input/button element was clicked 👍🏼 ...if that is not possible for some reason, then it makes sense to focus either on the parent element, or the element that comes before it (in the later case we may still have some jumping around, but it will be less then taking people to the top of the page). My 2c. |
Are there other form items in Backdrop, that do not capture the focus when clicked? |
I can't think of anything else ta the moment @indigoxela ...the only similar issue I recall is with the token browser links when there are multiple token-enabled fields in the same form ...you need to manually select the field that you want the tokens to be added into, before opening the token browser. Not sure is that's still an issue or if we already fixed it though 🤷🏼 |
Description of the bug
(Pulled out from #4342 (comment))
If an off-screen field (e.g. node title) has focus when a modal button (e.g. "Select existing file" image library modal) is clicked, the page can jump in unexpected ways when the modal is closed. Perhaps we should give these types of buttons focus manually when they are clicked, to prevent this and anchor the page where it is.
The text was updated successfully, but these errors were encountered: