+ 9
[SOLVED]Issue with pointerup event.
When I use pointerdown and pointerup events they work absolutely fine on desktop. But on mobile browsers it behaves strange. Pointerdown event is okay on mobiles but pointerup event is not. Pointerup event doesn't get triggered if position of pointer is changed, for example if I just touch and don't swipe on screen it works but if I swipe it doesn't get triggered Edit: Magically, re-installing chrome worked!! https://code.sololearn.com/WYnNfat435be/?ref=app
6 Antworten
+ 8
+ 6
For touch screen, the events to listen are
touchstart
touchmove
touchcancel
touchend
https://code.sololearn.com/WPV6TSGBsLDi/?ref=app
+ 3
Gordon
For some reason touchstart is not working on any browser.
I tried writing code with it initially but it didn't work at all so I looked for alternative and I found two
mouse events and pointer events.
mouse events does not work on mobiles so I tried writing pointer events which works good on desktop but not on mobile.
+ 3
Gordon that code is working fine on Sololearn but not on Desktop(both Mozilla and chrome) and mobile chrome. 😕🤔
+ 3
Oh okay, alright. I reinstalled chrome and it seems to be working now.
Thanks @Gordon
+ 2
Pointer up and pointer down events are working ,but I think when you swipe you sure touch screen so that is pointerdown happening but not pointerup since you are just swiping