-
Notifications
You must be signed in to change notification settings - Fork 724
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
Holding gesture not working properly on mobile. #7130
Comments
This is the expected behavior: for perf consideration we don't start a timer on each pointer pressed to detect the "hold gesture" instead we rely on the fact that touches are imprecise and we continuously get a lot of pointer move when holding with a finger. So the "bug" is present only in the emulator where your are simulating fingers using a "precise" pointer (i.e. the mouse). But if you have a device onto which getting the |
@jeanplevesque @PhilippeAudet-Stratejia Can you validate if the same repro works on a physical device? |
I didn't think about that, but it's a good idea if it improves the perfs. As I said, it didn't happen often where I could stay completely still on a physical device, but i'll try again to see if the threshold good on the devices I own. |
@PhilippeAudet-Stratejia have you had the chance to validate ? |
I have tested it out, and I believe the threshold could be lower. From the sample in this issue, I am able to hold on the rectangle and not trigger the event pretty reliably. Also, sometimes it's also that I would expect the holding event to be fired earlier, but I haven't moved enough for it to be recognised, even though it does get called after a little while. |
@PhilippeAudet-Stratejia you mean the duration threshold? The issue here is that it's really subjective, last time that I've checked, I was found that it was easier to trigger the holding on uno than on UWP (both on touch devices obviously). If you were able to give me any measurable data/comparison it would be nice. |
I agree, this is really subjective and it's pretty hard to have any measurable data. As for the event, I believe it's a matter of luck, as sometimes I found myself holding and wondering why the event isn't called, when in fact it's because I haven't moved enough yet. |
@PhilippeAudet-Stratejia Can you re-test this with the latest version of Uno.UI now that a fix was merged? |
@dr1rrb @jeanplevesque I just tested this and I couldn't get the holding event to fire past 800ms, which works really well now 👍 |
Current behavior
When using the holding gesture, the event is only called after moving the pointer, and when moving further will then set the holding state to canceled.
On UWP, the gesture is working as intended.
Expected behavior
When holding down and not moving at all on mobile, the Holding event should be raised without having to move the cursor. Although it's hard to press completely still, it does happen and the intended behavior when holding isn't executed.
How to reproduce it (as minimally and precisely as possible)
HoldingSample.zip
On UWP :
On Android/iOS:
Workaround
The holding still works, but it's not consistent. It can also be archieved manually with the pressed event and timers, but it's also not as consistent.
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
NuGet package version(s)
Uno.UI : 3.11.0-dev.113
Uno.RemoteControl : 3.11.0-dev.113
Uno.Core: 2.4.0
Affected platforms
iOS, Android
IDE
Visual Studio 2019
IDE version
16.11.13
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: