Why ontouchmove on a element is listening for touches outside that? [Solved] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why ontouchmove on a element is listening for touches outside that? [Solved]

I thought when you move finger outside the element having the above mentioned handler it would trigger some ontouch cancel or ontouch end but instead it logs out the value unless you remove the finger , Also another thing I noticed about ontouchmove that they aren't really logging out value consecutively ,like there is big gap between numbers when your fingers move a bit fast https://code.sololearn.com/WBow8uRO7nqL/?ref=app Edit: now I see why touchmove wasn't working perfectly,browser drag event kicks in , interrupting or even cancelling(in case of pointers) the "move" events

26th Sep 2020, 2:06 PM
Abhay
Abhay - avatar
3 Answers
+ 4
I can't answer your question directly (either one), but I have found a workaround so that you can perform a task only when your finger is on the element you started on. https://code.sololearn.com/WGnCEGl5PhVM/?ref=app
26th Sep 2020, 3:12 PM
Russ
Russ - avatar
0
Mirielle[ InAcTiVe ] got it ,thank you
26th Sep 2020, 7:06 PM
Abhay
Abhay - avatar
0
Russ thank you
26th Sep 2020, 7:07 PM
Abhay
Abhay - avatar