Merged
Conversation
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
JonasBa
reviewed
Feb 25, 2026
…l open When a drawer or modal opens, we set overflow:hidden on the body to prevent background scroll. This removes the scrollbar, giving the page extra width and causing a visible layout shift. Apply scrollbar-gutter:stable alongside overflow:hidden so the browser reserves space for the scrollbar even when it is hidden, preventing the shift. Fixes DE-974 Co-Authored-By: Claude <noreply@anthropic.com>
…eScrollLock scrollbar-gutter:stable on <html> causes a persistent empty scrollbar track on classic-scrollbar systems (Windows / macOS "Always show"), and makes fixed-position overlays appear to jut out past the page content area. Instead, measure the actual scrollbar width at lock-time and apply it as padding-right on <body>. The body content stays the same width while the scrollbar is hidden, and fixed-position overlays (which use the full viewport) are unaffected. On overlay-scrollbar systems the measurement is 0 so no padding is applied. Extract the logic into a reusable useScrollLock hook so the drawer and modal share the same implementation. Fixes DE-974 Co-Authored-By: Claude <noreply@anthropic.com>
Moves useScrollLock utility and its test file from static/app/utils/ to static/app/components/core/ to better organize core UI utilities alongside other core components.
2bbf61f to
559b6b3
Compare
JonasBa
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
useScrollLockhook that prevents body scrolling and compensates for the layout shift that occurs when the scrollbar disappears.See Before (layout shift) and After (no layout shift)
scroll-lock-bna.mov
Closes DE-974