Skip to content

[scroll area] Disable user-select on scrollbar and non-main button interactions #2338

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

Merged
merged 2 commits into from
Jul 22, 2025

Conversation

atomiks
Copy link
Contributor

@atomiks atomiks commented Jul 22, 2025

Closes #2329

Doesn't seem to repro on macOS or Windows, so likely caused by some specific esoteric setup

Copy link

pkg-pr-new bot commented Jul 22, 2025

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2338
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2338

commit: df48ddd

@mui-bot
Copy link

mui-bot commented Jul 22, 2025

Bundle size report

Bundle Parsed Size Gzip Size
@base-ui-components/react 🔺+72B(+0.02%) 🔺+7B(+0.01%)

Details of bundle changes

Generated by 🚫 dangerJS against df48ddd

Copy link

netlify bot commented Jul 22, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit df48ddd
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/687f3c8321c17a0008fbf057
😎 Deploy Preview https://deploy-preview-2338--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@atomiks atomiks force-pushed the fix/scroll-area-select branch from 3c9bec2 to df48ddd Compare July 22, 2025 07:23
@@ -84,6 +84,10 @@ export const ScrollAreaRoot = React.forwardRef(function ScrollAreaRoot(
});

const handlePointerDown = useEventCallback((event: React.PointerEvent) => {
if (event.button !== 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this related to the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing the scrollbar with text selection/user-select styling I noticed this bug, too. Updated title to better reflect both fixes

@atomiks atomiks changed the title [scroll area] Set user-select none style on scrollbar [scroll area] Disable user-select on scrollbar and non-main button interactions Jul 22, 2025
@atomiks atomiks merged commit 430d8e7 into mui:master Jul 22, 2025
21 checks passed
@atomiks atomiks deleted the fix/scroll-area-select branch July 22, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working component: scroll area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScrollArea
4 participants