scroll-padding
not respected when ListBox
is rendered in a Popover
#7037
Labels
scroll-padding
not respected when ListBox
is rendered in a Popover
#7037
Provide a general summary of the issue here
When a
ListBox
which containsscroll-padding
styles is rendered in aPopover
, the scroll padding is not respected. For example, the contact list example uses and shows the usefulness of scroll padding, but if that contact list was to be rendered in a popover, it would result in a bad keyboard experience as the focused item may be obscured by a sticky header.🤔 Expected Behavior?
Scroll padding should work regardless of whether the listbox is rendered in a popover.
😯 Current Behavior
The scroll padding during keyboard navigation is not respected, resulting in any sticky headers clipping the focused item.
The following video is from the code sandbox reproduction:
listbox-issue-encoded.mp4
💁 Possible Solution
I thought it was a general browser issue with scroll padding and having the scroll container hosted in a non-static container. I tried placing it in a simple div with
position: absolute|fixed
but the issue did not reproduce. It was only inside the popover I could reproduce it.🔦 Context
My use case is a
Select
with sticky headers:🖥️ Steps to Reproduce
See this code sandbox which includes both a reproduction and an option to render the list box outside a popover to observe that it works correctly otherwise.
Version
RAC 1.3.3, RA 3.34.3
What browsers are you seeing the problem on?
Chrome, Safari
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: