2

I am working on a mobile app and have got lots of touch events on various elements. Unfortunately I cannot test my app on my pc browser as it does not support touchevents. Is there any way I can change all touch events to click events dynamically if I am running on a pc ( ofcourse by checking the useragent ) ?

Thanking you

Imran Omar Bukhsh
  • 7,849
  • 12
  • 59
  • 81

2 Answers2

2

You can emulate touch events in the chrome web developer tools:

enter image description here

Joseph Silber
  • 214,931
  • 59
  • 362
  • 292
1

Chrome Developer Tools support touch emulation. But it's not that comfort to use. So I just made a chrome extension for touch event emulation. It translate mousedown, mousemove, mouseup events to touchstart, touchmove, touchend. It actually simulate iphone5, so user agent also changed.

https://chrome.google.com/webstore/detail/touchphone-simulator/jijkpkhmnpbecppjhicgegndbbgfnngf

Jonghee Park
  • 1,257
  • 15
  • 14