Repository navigation
[popups] Fix page scroll jump when input has focus on unmount in Safari - #3925
Conversation
commit: |
Bundle size report
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Greptile OverviewGreptile SummaryAdded a Safari-specific fix to prevent a page scroll jump bug that occurs when an input element inside a popup has focus when the popup unmounts. The fix uses
Confidence Score: 5/5
Important Files Changed
|
mj12albert
left a comment
There was a problem hiding this comment.
The Esc bug is fixed
Opening with a pointer then selecting an item with the keyboard
I couldn't reproduce this though, do you mean opening with the pointer, then highlighting an item with the pointer then Enter? Also tried opening with pointer, arrow down then enter ;you mention typing after opening with pointer is fine
Yeah, opening with pointer, then pressing arrow down and Enter to select an item had the issue. If you typed something in the input first (just one char) it doesn't happen |
Weird, it doesn't happen to me on Sequoia + Safari 26.2 🙃 |
You need to have something selected first (doesn't happen initially), then re-open with a pointer — then it happens |
Not really sure why this occurs, but:
https://deploy-preview-3925--base-ui.netlify.app/react/components/combobox#input-inside-popup
Press trigger with pointer then press Esc in Safari. Opening with a pointer then selecting an item with the keyboard also has the bug.
If you open with a keyboard instead of a pointer, it doesn't happen. Or typing and then selecting with a keyboard after opening with a pointer.