Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What ist the difference between ontouchend and ontouchleave?

It seems like for the following question Google should give an answer but (for me) it doesn’t.
What ist the difference between the events ontouchend and ontouchleave or ontouchstart and ontouchenter, respectively?

Many thanks

Philipp

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you have to consider your widget as a collision box that react to touch on screen

ontouchend() is called when you lift off you finger off the screen, won’t activate if you first slide ouside the colision box.

ontouchleave() is called if your finger touche the colision box werever it come from et leave eitheir by lift up or sliding your finger out of the colision box.

ontouchenter() is as soon your finger enter the colision box

ontouchstart() is only called is your finger directly touched the collision box, its make to avoid accidental activation by sliding from another place of the screen

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading