Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Touchenter and touchleave events support

I read about touchenter and touchleave events, at mozilla website and w3 website, but can not find any browser to support it or any javascript library that mimics that effect.

Please suggest what could be done as there workaround, as I am working for some mouseover like effect , event gets triggered when fingers enter the element, not when user lifts and touches elements again.

Thanks :)

like image 232
Ajit Kumar Singh Avatar asked Apr 16 '14 14:04

Ajit Kumar Singh


People also ask

Can I use touch events?

Touch events are supported by Chrome and Firefox on desktop, and by Safari on iOS and Chrome and the Android browser on Android, as well as other mobile browsers like the Blackberry browser.

What is a touch event?

Touch events consist of three interfaces ( Touch , TouchEvent and TouchList ) and the following event types: touchstart - fired when a touch point is placed on the touch surface. touchmove - fired when a touch point is moved along the touch surface. touchend - fired when a touch point is removed from the touch surface.

Which event is fired on a text field within a form when a user tabs to it clicks it or touches it?

When a user clicks a button or presses a key, an event is fired. These are called a click event or a keypress event, respectively. An event handler is a JavaScript function that runs when an event fires.


2 Answers

I suggest that you use

document.elementFromPoint(touch.x, touch.y);

on touchmove event.

like image 153
Lorenzo Von Matterhorn Avatar answered Sep 20 '22 20:09

Lorenzo Von Matterhorn


You're referencing an old draft, the latest one removed the touchenter and touchleave events.

like image 28
rvignacio Avatar answered Sep 19 '22 20:09

rvignacio