fabricjs / fabric.js

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

[Bug]: Mobile Devices Unable to Trigger dblclick Event #10154

Open 07ke opened 2 months ago

07ke 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

null

Steps To Reproduce

  1. Open the application on a mobile device.
  2. Attempt to perform a double-tap on an element that should trigger the dblclick event.
  3. Observe that the event is not fired and no associated handlers are executed.

Expected Behavior

On mobile devices, performing a double-tap should trigger the dblclick event and execute the associated event handlers.

Actual Behavior

The dblclick event is not triggered on mobile devices, and the event handlers do not execute.

Error Message & Stack Trace

We are experiencing an issue where the dblclick event is not being triggered on mobile devices. The dblclick event and the associated handlers such as mouse:dblclick and mousedblclick are not functioning as expected on mobile platforms.

canvas.on("mouse:dblclick", a);
canvas.upperCanvasEl.addEventListener("dblclick", a);
canvas.upperCanvasEl.addEventListener("mousedblclick", a);
asturur commented 2 months ago

Do you know if it was working before on older version of fabricJS? Are you able to trigger a NATIVE JS dblclick event on a div?

07ke commented 2 months ago

Do you know if it was working before on older version of fabricJS? Are you able to trigger a NATIVE JS dblclick event on a div?

div dblclick ✔ no fabric canvas dblclick ✔ fabric mouse:dblclick ✘ fabric canvas dblclick ✘