Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(lemon-ui): let the wheel scroll a modal with nested content (#123593)

Phill75aa0c5e0cee
diff --git a/frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss b/frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss
index 8d636800fb9b..c8dec0cb8f72 100644
--- a/frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss
+++ b/frontend/src/lib/lemon-ui/LemonModal/LemonModal.scss
@@ -102,13 +102,20 @@ body.ReactModal__Body--open {
.LemonModal__content {
padding: 1rem;
overflow-y: auto;
- overscroll-behavior: contain;
&.LemonModal__content--embedded {
padding: 0;
}
}
+ // Contain the scroll chain only on the outermost content, which is the section that scrolls.
+ // A nested content section has no height limit, so it is a scroll container that cannot scroll,
+ // and containment there stops the wheel at that section instead of passing it to the section
+ // above. The page behind the modal stays still because .LemonModal__layout also contains it.
+ .LemonModal__layout > .LemonModal__content {
+ overscroll-behavior: contain;
+ }
+
.LemonModal__container {
display: flex;
height: 100%;