zingtouch
zingtouch copied to clipboard
Pan events still firing after mouseup (desktop safari)
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?
How did you go with this one?
@devanecondition Have you found a way to work around the issue?
I haven't unfortunately @toothbrush7777777
@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.
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.