Skip to content
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

Fast gestures on laggy sites are recognized improperly #636

Closed
norill opened this issue Apr 8, 2022 · 5 comments
Closed

Fast gestures on laggy sites are recognized improperly #636

norill opened this issue Apr 8, 2022 · 5 comments
Labels

Comments

@norill
Copy link

norill commented Apr 8, 2022

Describe your matter in detail

Performing a gesture very quickly on certain sites leads to a different gesture being fired. This usually happens when a heavy site is loading or sometimes even after the site is loaded (eg. https://devicehunt.com/all-usb-vendors ). No matter what gesture i perform, it's always recognized as a left down drag. It only happens if the gesture is performed with a single quick stroke. It occurs even if you hold the mouse button down for a long time after the initial stroke, as long as the cursor doesn't move - if it moves even one pixel then the correct gesture will fire.

Screenshots or further assistance

2022-04-09 00_49_46-All USB Vendors _ Device Hunt — Mozilla Firefox

Your System

  • Operating system: Windows 7
  • Firefox version: 94.0.1
  • Gesturefy version: 3.2.4
@Robbendebiene
Copy link
Owner

As far as I know this cannot been solved. This is due to the (mostly) single threaded nature of JavaScript. Since the site is in use by other code or parsing HTML there is less room for dispatching any pointer events. Gesturefy is even using https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents to get as much information about the mousemovement as possible.

No matter what gesture i perform, it's always recognized as a left drag.

If you perform a right swipe is it really always recognized as a left swipe? Can you make a screen recording of this (including your mouse cursor)? At least I cannot reproduce this and it also doesn't make sense to me. All I get is laggy gestures.

Just to be clear, does the visual gesture representation somehow match the executed gesture for you (even though you might have moved your mouse differently then visualized)?

@norill
Copy link
Author

norill commented Apr 9, 2022

correction - gestures are always improperly recognized as down swipe, not left. sorry for the confusion. Visual gesture representation always matches the actual movement, although during a lag it degenerates to a single line segment that only matches start and end point
dfgdfgd

@norill
Copy link
Author

norill commented Apr 9, 2022

notice how the gesture name appears only if there are any follow-up movements after the initial stroke - by then the buggy condition disappears and the gesture is properly recognized. also a tip for reproducing: you can increase a site lagginess to arbitrary levels by repeated duplicating of the main div node in developer tools.

Robbendebiene added a commit that referenced this issue Apr 10, 2022
Gestures composed of two points were not visually matched (#636).
This commit also removes the workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1450692
@Robbendebiene
Copy link
Owner

Thanks for the recording and additional explanation.

notice how the gesture name appears only if there are any follow-up movements after the initial stroke

So I think I was able to fix this.

However I was not able to reproduce the following part:

  • gestures are always improperly recognized as down swipe

Anyhow, can you please test the latest master branch?

@norill
Copy link
Author

norill commented Apr 10, 2022

works perfectly, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants