zingtouch icon indicating copy to clipboard operation
zingtouch copied to clipboard

Pan events still firing after mouseup (desktop safari)

Open devanecondition opened this issue 7 years ago • 5 comments

I made a small codepen for this here: https://codepen.io/devanecondition/pen/YxdopX

In Desktop Safari:

  • Drag the circle to the point where the cursor has left the window
  • Once the cursor is out of the window, mouse up
  • Move the cursor over the circle's Region again

Result: The circle will still move with the mouse. In Chrome, the pan events will stop with the mouse up.

Is there a different approach, or a way to manually cancel the pan events?

devanecondition avatar Aug 31 '17 20:08 devanecondition

How did you go with this one?

1ubuntuuser avatar Dec 19 '17 19:12 1ubuntuuser

@devanecondition Have you found a way to work around the issue?

toothbrush7777777 avatar Feb 20 '18 20:02 toothbrush7777777

I haven't unfortunately @toothbrush7777777

devanecondition avatar Feb 20 '18 21:02 devanecondition

@devanecondition The same issue used to occur with Firefox and IE in the past (with my own handwritten code). Neither browser would fire the mouseup event if you released the mouse outside the window.

toothbrush7777777 avatar Feb 21 '18 12:02 toothbrush7777777

Does the mouseleave event trigger when the mouse is moved outside the window? Maybe the lib should listen for the mouseleave on the region and end the pan when cursor exits the region, even when the mouse button is still pressed.

axelpale avatar May 22 '22 10:05 axelpale