Oromis / touch-vtt

Introduces touch screen support to FoundryVTT
40 stars 26 forks source link

Zoom/pan gestures work only once #68

Closed rzhikharevich closed 4 months ago

rzhikharevich commented 5 months ago

After opening Foundry I can use either of the gestures but only once. After that multi-touches seem to be registered individually, e.g. pinching creates selection rectangles with one point of the rectangle jumping between both fingers.

Foundry version: 12.327 (stable) Device: a touch-enabled Windows 11 tablet/laptop hybrid (Minisforum V3) Browser: Chrome / Firefox

Additionally, the module seemed to work perfectly in Foundry v11.315 (at least with the three-finger panning option; two-finger panning was very jittery).

rzhikharevich commented 5 months ago

Enabling the Touch Events API with --touch-events seems to fix this for me in Chrome. Maybe something is wrong with the event filtering logic (i.e. isTouchEvent and shouldHandleEvent) when the Pointer API is used (I've noticed that the touches dictionary ends up with keys that are never deleted when the bug is triggered)?

cc @Aioros

Aioros commented 5 months ago

Interesting. Thanks for all the info, I'll look into it.

Aioros commented 4 months ago

Hey, so I just deployed v2.0.0, which has a significant overhaul in the basic functionality of the module. Any chance you could let me know if the issue is still there for you after updating?

rzhikharevich commented 4 months ago

@Aioros Hi, the latest version seems to work for me without my workaround (at least in Chrome, haven't tested Firefox yet). Thank you for your efforts!

Aioros commented 4 months ago

Awesome, thanks for the feedback! I'll close this issue, feel free to open a new one if it still happens in other environments.