Select dropdown remains viewport-positioned due to Popover Overlay (feature discussion)
Hi š
While working on rocket.chat/rocket.chat, I noticed that the Select component renders its dropdown inside Popover, which internally uses Overlay from react-aria.
Since Overlay renders via a portal to document.body, the dropdown remains viewport-positioned and does not scroll with its container.
From tracing the implementation, the flow looks like this:
Select ā SelectAria ā Popover ā Overlay (react-aria)
This appears to be intentional behavior from react-aria. However, in certain layouts (for example, scrollable settings pages), the dropdown can feel visually detached from the scroll container.
Would it make sense to optionally expose a positioning strategy on Popover (e.g., fixed vs absolute) so components like Select can render relative to their scroll container when desired?
The default behavior could remain unchanged (fixed) to avoid breaking changes.
Happy to explore a PR if this aligns with the design goals.
Reproduction / Context
Video demonstrating the behavior: https://github.com/user-attachments/assets/9c51e528-6e4e-44c1-a933-107ad55570cf
Hi! I'm ready to work on this. Could you assign it to me?
Hi
I checked the component flow: Select ā SelectAria ā Popover ā Overlay (react-aria)
From what I observed, the dropdown behavior comes from Overlay, which portals the popover to document.body. Because of this, the dropdown does not scroll with its container.
Iād like to work on this by implementing positioning strategy in Popover' (e.g., fixedvsabsolute) so components like Select` can render relative to their scroll container when needed.
If this approach is good enough for this issue , could this issue be assigned to me?