Skip to content

Instantly share code, notes, and snippets.

@felquis
Last active December 24, 2015 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felquis/c79a67647f9bf842f749 to your computer and use it in GitHub Desktop.
Save felquis/c79a67647f9bf842f749 to your computer and use it in GitHub Desktop.
Is something wrong with touchstart and touchend event?

Hi.. Let's make some tests with touchstart and touchend...

This is the demo full http://s.codepen.io/felquis/debug/obzbzg source code

Devices and browsers to test

  • Chrome for iOS
  • Firefox for iOS
  • iOS Safari
  • Opera Mini iOS
  • other iOS browser?
  • Android - Chrome
  • Android - Firefox
  • Android - Opera
  • UC browser for Android
  • Opera Mini Android
  • Internet Explorer Mobile
  • Desktop Touch - ??

The main focus is to know how is the cross-device, cross-platform and cross-browser support of these events and create issues in bugtrackers if applicable.

Case 1

1 - Touch the screen and imediately remove your finger

Expected output: start X and Y should be equal end X and Y, if this is true, isEqual should be true

Case 2

1 - Touch the screen 2 - move your finger 3 - leave your finger

Expected output: start X and Y must be different from end X and Y, and isEqual should be false

Case 3

1 - Touch the screen and move your finger out of the screen

Try it leaving from the top, left, right and bottom...

Expected output: the same from Case 2, the touchend must be fired

Case 4

1 - Touch the screen 2 - Move your finger down the screen 3 - Leave your finger

Expected output: same as Case 2 and the output end, should appear emmediately when you leave your finger

That's it

Make theses test cases and comment here if it worked as expected, and if not. Inform your device, OS Version and Browser Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment