-
Notifications
You must be signed in to change notification settings - Fork 236
fix(picker): scrolling issue inside overlays in Safari iPad #5868
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
base: main
Are you sure you want to change the base?
Changes from all commits
83a0176
2b2214a
38f899f
9d6ebc4
3047c17
0f5615f
edd013b
65f9ba0
deee98f
f117115
18de5af
32dbe21
5697276
edd1dda
fd45542
5a7a716
62211e1
17825b8
09fac59
b50bece
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@spectrum-web-components/overlay': patch | ||
| '@spectrum-web-components/picker': patch | ||
| --- | ||
|
|
||
| **Fixed** issue where picker menus inside overlays could not scroll to the bottom after selecting an item and reopening. The problem was caused by the overlay's placement calculation happening before the menu fully rendered, resulting in incorrect height measurements. | ||
|
|
||
| This fix ensures picker menus maintain proper scrollable height when reopened, regardless of the selected item's position. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should not need to be mocking user agents in these tests, we already run them for safari, chrome, and firefox. we should be using our browser checks
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's also a lot of repetitive code in each test that could be moved to the beforeEach. Actually looking at this closer, these all look identical in test assertions. this functionality should already be covered in other menu tests. can you explain the purpose and need of these tests so i can better understand?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're correct on both fronts. These tests are an anti-pattern. I added these initially to achieve branch coverage on the Safari-specific conditional path in |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what the double bangs were doing and why removing them fixes this?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the fix. Apologies if this has surfaced up as the fix scenario. They're functionally the same in this context. The
!!pattern is useful when you need to store or return an explicit boolean, here its not the case. No impact on the current logic or any regressions.