Skip to content
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

Popover scroll behavior should work for scrollable containers too #107

Open
joshuarrrr opened this issue Nov 4, 2022 · 0 comments
Open

Comments

@joshuarrrr
Copy link
Member

Is your feature request related to a problem? Please describe.

One of the responsibilities of the OuiPopover component is to correctly position itself relative to some other component. But positioning may need to be updated if the reference component moves (e.g. if it's in a srollable container). The repositionOnScroll property is intended to provide this functionality, but it only listens to scroll events on window currently.

Describe the solution you'd like

I'd like to update the implementation of repositionOnScroll to add scroll listeners for any parent nodes; alternatively, we may want to refactor the property so that it can actually take a particular node to bound listeners to as a value.

Describe alternatives you've considered

We could also expose the positionPopover method and allow developers to take ownership over position updates, but this seems like it would duplicate lots of functionality already built into OuiPopover (such as debouncing).

Additional context

An example limitation is described it opensearch-project/OpenSearch-Dashboards#2782

Screen.Recording.2022-11-04.at.11.58.45.AM.mov
@joshuarrrr joshuarrrr added the enhancement New feature or request label Nov 4, 2022
@KrooshalUX KrooshalUX added Component Iteration and removed enhancement New feature or request labels Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants