[trackMouse], End event is not fired when moving out of <Swipeable> area
See original GitHub issueSteps to reproduce:
- Start swipeing on some element
- Move your finger so it’s outside of
<Swipeable>
area (but still pressed) - Release finger
Expected:
- onSwiped or onSwiped[Direction] was fired: a) just when finger moved out of element area b) when finger was released outside of element area (preffered is b) )
Actual:
- onSwiped or onSwiped[Direction] is not fired.
Note: It happens when trackMouse
is enabled.
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Handling Trackpad Events - Apple Developer
Scroll and swipe gestures, once begun, are locked to that gesture until the gesture ends. As it generates gestures, the trackpad hardware might ......
Read more >Using Touch Events - Web APIs | MDN
A disadvantage to using mouse events is that they do not support ... touchmove - fired when a touch point is moved along...
Read more >AngularJs $swipe not firing end event on mouseup
On a touch screen device, the demo functions correctly. The start event, move events, and end event fire respectively when dragging the finger ......
Read more >react-swipeable - npm
Start using react-swipeable in your project by running `npm i ... It will also not trigger any callbacks and the swipe event will...
Read more >Working with Events from Touch-Enabled Devices | JavaFX 2 ...
A single swipe event is generated for each swiping gesture. ... If the scroll gesture ends outside of the window, the shape is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@TanaseHagi interesting solution with the
extends Swipeable
. I think i’d like to see this functionality added in the next major version, turned on whentrackMouse
is used 👍I had the same issue with
trackMouse
prop set to true. My solution was to bindmousemove
andmouseup
events on the document object.The reason for this is that
onTouchMove
andonTouchEnd
also fire for touches outside of thenodeName
element they were bound to, whileonMouseMove
andonMouseUp
do not do not fire when the user moves outside thenodeName
element or releases the mouse outside of it.This is my typescript code to get around the problem.