-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
New EnforceFocus on overlay causes dialogs to jump #4920
Comments
@michael-yx-wu - I believe |
I think you're right. Seems like it |
@ro-savage I'm not sure how to use your code sandbox... the dialog doesn't scroll or jump...? Also, #4919 disabled |
I think he meant to enclose the |
Can someone post an updated sandbox demonstrating the bug? |
@adidahiya - Sorry it looks like the sandbox didn't actually save my changes last time. I've just re-created it at the same link. Here is a video of the issue as well |
@ro-savage ok, thanks for the updated sandbox and the video. I can clearly see the issue now. You can easily work around this issue by setting Maybe there's something more clever we can do here in |
Environment
"@blueprintjs/core": "^3.50.2",
"@blueprintjs/datetime": "^3.23.12",
"@blueprintjs/popover2": "^0.12.2",
"@blueprintjs/select": "^3.18.4",
Code Sandbox
https://codesandbox.io/s/blueprint-sandbox-forked-5m8ok?file=/src/index.tsx
Steps to reproduce
Open dialog, scroll to the date picker and select a date. The user is thrown back up to the top of the screen (the first thing has can be focused)
Actual behavior
The user is thrown back to the first focusable element
Expected behavior
The user should remain at the current position
Possible solution
I believe this was introduced by #4894
When you click the date picker, the dialog loses focus, then when you select a date, the dialog regains focus and the new change now automatically focuses the first element.
I would expect this only to apply when a overlay/dialog/etc was first opened, not after it's already been open.
The text was updated successfully, but these errors were encountered: