Skip to content

Conversation

@bernardobelchior
Copy link
Member

@bernardobelchior bernardobelchior commented Nov 25, 2025

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 preventDefault in touchmove:

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

@bernardobelchior bernardobelchior added type: bug It doesn't behave as expected. scope: charts Changes related to the charts. labels Nov 25, 2025
@mui-bot
Copy link

mui-bot commented Nov 25, 2025

Deploy preview: https://deploy-preview-20439--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 🔺+364B(+0.08%) 🔺+83B(+0.06%)
@mui/x-charts-premium 🔺+364B(+0.08%) 🔺+62B(+0.05%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against ba82152

}

// Prevent scrolling on touch devices when dragging the thumb
thumb.addEventListener('touchmove', preventDefault, { passive: false });
Copy link
Member Author

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

Comment on lines +89 to +90
thumb.addEventListener('pointercancel', onPointerEnd);
thumb.addEventListener('pointerup', onPointerEnd);
Copy link
Member Author

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

@bernardobelchior bernardobelchior marked this pull request as ready for review November 25, 2025 08:31
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 25, 2025

CodSpeed Performance Report

Merging #20439 will not alter performance

Comparing bernardobelchior:improve-zoom-slider-thumb-mobile (ba82152) with master (f5e0bbc)1

Summary

✅ 13 untouched

Footnotes

  1. No successful run was found on master (5583a5e) during the generation of this report, so f5e0bbc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@bernardobelchior bernardobelchior merged commit 6ef52fd into mui:master Nov 25, 2025
25 checks passed
@bernardobelchior bernardobelchior deleted the improve-zoom-slider-thumb-mobile branch November 25, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: charts Changes related to the charts. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants