[core] All swipe gestures are being interpreted as GESTURE_SWIPE_LEFT
on web browsers with Touch Screen.
#3141
Closed
3 tasks done
Issue description
All swipe gestures are being interpreted as
GESTURE_SWIPE_LEFT
on web browsers with Touch Screen:Responsive Design Mode
andTouch Simulation
enabled, on Linux;Toogle Device Toolbar
enabled, on Linux;After some investigation, it appears that the
event.position[0]
assigned toGESTURES.Touch.downPositionA
at rgestures.h#L286 is usually normalized. However, for some reason, on the Web (HTML5) build, when Touch or Touch Emulation are used, the value being passed toGESTURES.Touch.downPositionA
is not normalized, therefore causing theGESTURES.Drag.angle
calculation at rgestures.h#L310 to get a wrong result.The swipe gestures are correctly interpreted on Chrome or Firefox on Linux without Touch Emulation.
Probably not the best solution, but a workaround would be adding the following at rgestures.h#L309:
If there isn't any better solution, I can try to send a PR.
Environment
Platform: Linux (x86_64)
Operating System: Linux Mint 21.1
OpenGL version: 3.1 Mesa 22.0.5
GPU: Intel HD Graphics 3000
Platform: Android
Operating System: Android 5.1.1
OpenGL version: OpenGL ES 1.1/2.0
GPU: Mali-400
Issue Screenshot
On Firefox (114.2.0) and Chrome (95.0.4638.74) for Android:
On Firefox (102.11.0esr 64-bit) for Linux:
On Chrome (114.0.5735.106 64-bit) for Linux:
Code Example
Minimal reproduction code to test the issue:
The text was updated successfully, but these errors were encountered: