-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
MudSwipeArea: Replace ontouch with onpointer #9445
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
Conversation
|
Does this mean you can perform swipe actions with a mouse? |
Yes. Was in a process to write a description. |
|
Forgot to migrate tests upd: Done |
|
Does it work with Color Picker, drag & drop re-ordering, etc? Though I guess those wouldn't have worked right with touch in that case. I wonder how people that use this control expect it to work and if they want to use it with mice. I can't think of any strong arguments either way - it seems like a fine change. MAUI/Windows don't do it: dotnet/maui#6152 (comment) but sites like YouTube do. |
Do you mean do they work if
Personally, I think it's a must. It's used in carousel, and not having the swipe gesture for mice in a carousel is awkward. If they don't want the gesture there is a property that disables it for the carousel. |
Yea, it's their legacy behavior that they drag everywhere WPF, Winform etc. It's a poor design, always got annoyed on poor support for touch in WPF in the components. Making a swipe gesture for a WrapPanel etc when business say that scollbar should be hidden is like good luck. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9445 +/- ##
=======================================
Coverage 91.53% 91.54%
=======================================
Files 414 414
Lines 13014 13014
Branches 2454 2454
=======================================
+ Hits 11913 11914 +1
Misses 551 551
+ Partials 550 549 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
It works with both mice and touch when these components are present with However, while testing, I noticed that Drag and Drop also causes the same exact bug with the Menu when it's present on the page. This is because it also uses: But this is a separate issue as it involves a different component. |
|
The #9458 fixes the main issue. |
Ego invoco deus MudBlazori ab mihi. Protego mihi ab hostili et malum! xD |
Ups xD enhancement* |
|
Do we want this change? to make Swipe work with mouse not just touch or nah? |
I think it makes some sense to have it for both. YouTube lets you open the sidebar with a cursor or touch for example |
Yeah, I also see a lot of carousel ads on electronic websites, and I always swipe them with a mouse to see if there are any good discount / gift offer. |
a78f849 to
386778c
Compare
|
danielchalmers
left a comment
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.
Could make the text in the examples user-select: none;
video6.mp4
|
Added to v8.0.0 Migration Guide #9953 |
|
Hi @ScarletKuro, I'm fighting with MudSwipeArea today. I don't seem to get it to work on an emulator. I tested on Edge's Dev Tools with the iPhone simulation and a .NET MAUI's Android emulator. None work. Interestingly, the I tried making a I haven't tested a physical device. Would it make a difference? Thanks |
|
@veler are you using the version 8 preview release? These changes aren't yet in the officially released version - v7 |
Hi! Yes, I'm using 8.0 preview 5 |
|
As it was said, this change are not released yet. |
Are you sure? I do see this change in the changelog of the release 8.0 preview 5, and that's what I'm using. https://github.com/MudBlazor/MudBlazor/releases/tag/v8.0.0-preview.5 |
My bad, you are right. Does it work for you on dev.mudblazor.com ? upd: hm seems not to work on real device, I will check later. |
Weird that it does work in firefox touch emulator tho. |
that's interesting 🤔 |
|
Fixed in #10461. As a temporary solution, you can add |
You rock! Thank you so much for this quick turnaround! |
|
Mobile Scroll is not working even after setting PreventDefault="false" : https://try.mudblazor.com/snippet/GYGpOPQkEjygXgAJ |



Description
Fixes: #9288
I don’t know why, but somehow these:
were affecting the behavior. It wasn’t due to the JS
mudElementRef.addDefaultPreventingHandlersor thestopPropagation="true".Replacing them with
onpointerdown,onpointerup, andonpointercancelfixed the issue for some reason.Pointer events are a superset of mouse, touch, and pen events. This is an improvement because I always thought swipe gestures should work with both touch and mouse devices, but it didn’t before.
How Has This Been Tested?
Visually
Type of Changes
Checklist
dev).