-
Notifications
You must be signed in to change notification settings - Fork 649
Remove content-visibility from dragging elements #7445
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
Conversation
Remove content-visibility property from dragging elements.
🦋 Changeset detectedLatest commit: fc4fce3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
jonrohan
left a comment
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.
Nice catch 👍🏻
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.
Pull request overview
This PR fixes a scroll jumping bug in PageLayout by removing the content-visibility CSS property from elements during drag/resize operations. The property was causing incorrect size calculations for off-screen content, leading to layout instability.
Changes:
- Removed
content-visibility: auto;from dragging elements while preserving other containment optimizations - Added changeset documenting the bug fix as a patch release
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/react/src/PageLayout/PageLayout.module.css | Removed content-visibility: auto; from .ContentWrapper[data-dragging='true'] selector to prevent size changes during drag operations |
| .changeset/fix-scroll-jump-on-resize.md | Added changeset documenting the bug fix for scroll jumping during resize |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/10450 |
Remove
content-visibilityproperty from dragging elements.Overview
When dragging elements, the
content-visibilityCSS property was causing the browser to skip rendering the content of off-screen elements. This resulted in the element's size changing during drag operations, which caused scroll jumping and layout instability when the container was resized.By removing
content-visibilityfrom dragging elements, we ensure that the element maintains its correct size throughout the drag operation, preventing unexpected scroll jumps.Closes #
Changelog
New
Changed
content-visibilityfrom elements during drag operations to prevent size changes and scroll jumpingRemoved
Rollout strategy
Testing & Reviewing
content-visibilityappliedMerge checklist