naver / egjs-axes

A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates.
https://naver.github.io/egjs-axes/
MIT License
179 stars 31 forks source link

fix: release input when mouse event is canceled #201

Closed malangfox closed 2 years ago

malangfox commented 2 years ago

Issue

https://github.com/naver/egjs-flicking/issues/721

Details

This fixes the invalid behavior of "mouse" inputType at PanInput.

Currently, the "mouse" inputType was not detecting the conditions similar as the "pointercancel" event occurs. Such as a situation that an image inside an element is being dragged. We can track the situation that mouse input event is canceled, similar to the situation in which "pointercancel" occurs, by checking the which in "mousemove" event.

This change keeps the same behavior as in hammerjs used in the past version of Axes.