fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
29.22k stars 3.52k forks source link

[Bug]: Touch:gesture not working on Chromebook #10171

Open willPHPwork opened 2 months ago

willPHPwork commented 2 months ago

CheckList

Version

6.0.2

In What environments are you experiencing the problem?

Chrome

Node Version (if applicable)

None

Link To Reproduction

na

Steps To Reproduce

  1. Go on Chromebook
  2. Open Chrome
  3. Try to detect touch:gesture with touch screen
  4. canvas.on('touch:gesture', function(e) { console.log(e); };

Try here: http://fabricjs.com/touch-events

Expected Behavior

Console.log shows event

Actual Behavior

Nothing

Error Message & Stack Trace

No response

gloriousjob commented 1 month ago

As it says at the top of the page, it's using a custom build with touch support. You can try to make a custom build yourself with the gestures module. However, note that the main dev does not have a touchscreen device so don't expect much support (the old support stopped back in v4). The idea today is to integrate your own touch support or use another touch library on top. You can enable pointer events in Canvas and make your own implementation on top of that. http://fabricjs.com/docs/fabric.Canvas.html#enablePointerEvents