You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiPopover] Scrolling an open popover down stretches page height #6592
This bug exists in Kibana as of 8.8.0. In elastic/kibana#145628, I isolated the scrolling on a dashboard to just the panel section, keeping the search/filter bar in view as you scroll down the dashboard. I noticed when I have an open popover with the repositionOnScroll flag on a panel lower on the dashboard and scroll it down out of view, it stretches the entire page's height and results in a double scrollbar with a white space below the panel section about the height of the popover. I didn't see this happening when I had a popover towards the top of the dashboard and scroll it up out of view.
@cqliu1 The EUI team is able to recreate the issue you're seeing on a local build. We're continuing to investigate the root cause and will keep you updated.
Hi @cqliu1 - the underlying issue is that EuiPopovers are portalled to the end of the document <body>, but what is actually scrolling in your Kibana dashboard is a separate .react-grid-layout scrolling div. repositionOnScroll is primarily intended to respond to window scrolling, and can behave unpredictably when the anchor to the scroll to is actually within something else.
Here are a few options you could consider as a solution:
Reconfigure your dashboard DOM to not have a nested scrolling container, but instead allow the normal scrolling to occur on the <body>. You can accomplish this by:
Not setting an overflow and height on your nested containers
Making your filters/toolbars position: fixed or position: sticky
Adding a margin-top or padding-top to offset the fixed filters/toolbars
Note: This is a medium dev level of effort but is probably the most technically/semantically correct solution.
Remove the repositionOnScroll prop, and instead add a scroll listener event that auto-closes the popover on scroll. (It's somewhat unlikely the consumer wants to return to the popover after they've scrolled away, although this is certainly a deliberate UX choice and may not always be the correct one). This is probably the lowest dev level of effort required.
If you absolutely know for sure you do not want either popovers to close on scroll or to change your layout DOM structure, then another option is you can wait for us to implement a new API for this behavior (portalling EuiPopovers into your .react-grid-layout scrolling container and adjusting our positioning logic to calculate off this parent container instead of window). One note of caution about this is our roadmap is extremely full currently, so this would be a low priority feature request for us that we would have no timeline or ETA for.
Hope that helps, and let us know if you have any questions!
👋 This issue hasn't seen activity in 3 days, so we're automatically closing this issue as answered. Please leave a comment if that's not the case, or if you have any remaining questions or issues.
Activity
JasonStoltz commentedon Feb 10, 2023
Thanks for the issue, we will investigate.
1Copenut commentedon Feb 14, 2023
@cqliu1 The EUI team is able to recreate the issue you're seeing on a local build. We're continuing to investigate the root cause and will keep you updated.
cee-chen commentedon Feb 15, 2023
Hi @cqliu1 - the underlying issue is that
EuiPopovers are portalled to the end of the document<body>, but what is actually scrolling in your Kibana dashboard is a separate.react-grid-layoutscrolling div.repositionOnScrollis primarily intended to respond to window scrolling, and can behave unpredictably when the anchor to the scroll to is actually within something else.Here are a few options you could consider as a solution:
Reconfigure your dashboard DOM to not have a nested scrolling container, but instead allow the normal scrolling to occur on the
<body>. You can accomplish this by:position: fixedorposition: stickyRemove the
repositionOnScrollprop, and instead add a scroll listener event that auto-closes the popover on scroll. (It's somewhat unlikely the consumer wants to return to the popover after they've scrolled away, although this is certainly a deliberate UX choice and may not always be the correct one). This is probably the lowest dev level of effort required.If you absolutely know for sure you do not want either popovers to close on scroll or to change your layout DOM structure, then another option is you can wait for us to implement a new API for this behavior (portalling EuiPopovers into your
.react-grid-layoutscrolling container and adjusting our positioning logic to calculate off this parent container instead ofwindow). One note of caution about this is our roadmap is extremely full currently, so this would be a low priority feature request for us that we would have no timeline or ETA for.Hope that helps, and let us know if you have any questions!
github-actions commentedon Apr 14, 2023
👋 This issue hasn't seen activity in 3 days, so we're automatically closing this issue as answered. Please leave a comment if that's not the case, or if you have any remaining questions or issues.