-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Various components: Prevent panning page by touch #8394
Conversation
This is a demonstration for MudBlazor#8379 I don't know the full ramifications on blanket applying touch-action:none on popover descendents. Future considerations: Enable swiping in tabs and rating controls which would warrant touch-action:none on them as well.
@Garderoben I put together a demonstration of the issue mentioned in #8336 (comment) and my proposed fix so you can see it in action |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8394 +/- ##
==========================================
+ Coverage 88.92% 89.60% +0.68%
==========================================
Files 410 420 +10
Lines 12253 14317 +2064
Branches 2452 3110 +658
==========================================
+ Hits 10896 12829 +1933
- Misses 826 908 +82
- Partials 531 580 +49 ☔ View full report in Codecov by Sentry. |
This a precursor to #6022 #7203 which I plan on taking a look at afterwards |
This comment was marked as off-topic.
This comment was marked as off-topic.
One method is to disable scrolling altogether when the popover is open. Ideally it would only prevent scrolling when the cursor/touch is physically inside the popover. That is a little harder to implement and will probably require javascript. The method in this PR prevents scrolling/panning (and zoom) with touch events but not the cursor. This is fine and is the simplest fix. |
- Simplifies the code - Makes the color picker fluid - Adds configurable debounce - Fixes some niche issues like svg selection Touch support will come later after MudBlazor#8394 is resolved
@MudBlazor/core-team opinions about this? I'm only worried about one thing and that's the use of the asterisk selector in the popover. It can drag down css load time. However i might be worried over nothing. My suggestion would be to add the necessary CSS changes to our own pickers themself where needed but this would not fix it for people building their own components in our popover. |
I'd also really like to see something like this get implemented. MudBlazor has lots of potential for mobile applications. |
@kelltom Do you have any other components in mind that are lacking in this area? I missed the static pickers for one. |
@danielchalmers Ones that come to mind:
|
Description
Resolves #8379
Resolves #4396
I don't know the full ramifications on blanket applying
touch-action: none
on popover descendants.In the future this could be added to controls like tabs and rating controls to implement swipe functionality.
How Has This Been Tested?
visually
Types of changes
timepicker.mp4
snackbar.mp4
slider.mp4
popover.mp4
menu.mp4
colorpicker.mp4
Checklist:
dev
).