Skip to content

[scroll area] Fix overflow and scrolling state#4936

Open
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/scroll-area-overflow-state-fixes
Open

[scroll area] Fix overflow and scrolling state#4936
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/scroll-area-overflow-state-fixes

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 28, 2026

This fixes a batch of Scroll Area state bugs where delayed content, threshold updates, and custom scrollbar interactions could leave overflow or scrolling attributes out of sync.

Changes

  • Fixed overflow state when ScrollArea.Content mounts after the viewport's first measurement.
  • Recomputed overflow edge attributes when overflowEdgeThreshold changes.
  • Allowed wheel events on scrollbar tracks to chain at scroll edges.
  • Marked custom scrollbar wheel and track-click interactions as scrolling.
  • Cleaned up thumb drag state on pointercancel without releasing stale pointer capture.
  • Documented Content data attributes.

@atomiks atomiks added type: bug It doesn't behave as expected. component: scroll area Changes related to the scroll area component. labels May 28, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 28, 2026

commit: 307bd9d

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 28, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+379B(+0.08%) 🔺+133B(+0.09%)

Details of bundle changes

Performance

Total duration: 1,014.38 ms -135.07 ms(-11.8%) | Renders: 50 (+0) | Paint: 1,520.92 ms -220.87 ms(-12.7%)

Test Duration Renders
Scroll Area mount (300 instances) 74.58 ms ▼-20.57 ms(-21.6%) 3 (+0)

11 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 28, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 307bd9d
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a183eea9647e800071e5ada
😎 Deploy Preview https://deploy-preview-4936--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks atomiks force-pushed the codex/scroll-area-overflow-state-fixes branch from bcd6eb8 to 307bd9d Compare May 28, 2026 13:11
@atomiks atomiks marked this pull request as ready for review May 29, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: scroll area Changes related to the scroll area component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant