-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[charts-pro] Improve vertical zoom slider thumb on mobile #20439
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
[charts-pro] Improve vertical zoom slider thumb on mobile #20439
Conversation
|
Deploy preview: https://deploy-preview-20439--material-ui-x.netlify.app/ Bundle size report
|
| } | ||
|
|
||
| // Prevent scrolling on touch devices when dragging the thumb | ||
| thumb.addEventListener('touchmove', preventDefault, { passive: false }); |
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.
This is the actual fix
| thumb.addEventListener('pointercancel', onPointerEnd); | ||
| thumb.addEventListener('pointerup', onPointerEnd); |
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.
This is just handling the pointercancel event
CodSpeed Performance ReportMerging #20439 will not alter performanceComparing Summary
Footnotes |
Improve vertical zoom slider thumb on mobile.
Before:
Screen.Recording.2025-11-24.at.16.05.43.mov
Applying
touch-action: none(initial approach):Screen.Recording.2025-11-24.at.16.06.08.mov
Using
preventDefaultintouchmove:Screen.Recording.2025-11-25.at.09.20.47.mov
Chrome on Android also seems to work:
Screen.Recording.2025-11-25.at.09.30.28.mov