1
Talk to the guys! My question is the following: Why these touch events are not being recognized when I enter the DOM element with my finger, or when I leave it?
var canvasControlsHUD = document.getElementById("canvasControlsHUD");
canvasControlsHUD.addEventListener('touchenter',function(){
alert('Entered!');
},false);
canvasControlsHUD.addEventListener('touchleave',function(){
alert('Left!');
},false);
Only the touchMove works.
canvasControlsHUD.addEventListener('touchmove',function(){
alert('Moved!');
},false);
Excellent explanation! Thank you very much! But, Kazzkiq, I would like to do the following: when the screen is played, the
touchstart
. But in case the finger is slid out of that element, thetouchleave
be fired. How to do then?– Thiago Benine
In learnprogramming.net84.net/touchevents I built an example of touchevents, and the
touchleave
is never called. Because?– Thiago Benine