-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
fix: scrollbar gutters and dialog scrolling on open #1967
fix: scrollbar gutters and dialog scrolling on open #1967
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The only time it seems to move is in Safari when Show Scroll Bars is set to "Always," but that's the expected edge case from previous conversations.
Do we need a changelog entry for this?
@claviska it shouldn't move in Safari with scroll bar always 🤔 |
It's actually the fixed positioned things that are moving. CleanShot.2024-04-11.at.09.49.03.mp4 |
@claviska this seems to be a limitation of fixed positioned elements with padding-right hacks. In theory you would need to do something like this to handle fixed elements shifting:
The good news is this only affects Safari because they do not support Bootstrap has the same issue: |
scrollbar-gutter: var(--sl-scroll-lock-gutter) !important; | ||
} | ||
|
||
.sl-scroll-lock body { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably add a comment to the code, but by moving the overflow
to the body, it prevents the "scroll to top" issue mentioned in #1951
Addresses comments in #1821
@CodingDoug here's a codepen from the preview branch that should show the scrollbar gutter working as expected.
https://codepen.io/paramagicdev/pen/rNbKmQE?editors=1010