7

I want to activate touch events on Chrome to facilitate the debugging of an app that uses touchstart and touchend events.

It seems this post is a bit outdated because I cannot get the Overrides menu when I go to the developer settings, not on Chrome nor on Chrome Developer. This is what I get on Chrome Dev 73:

settings

I've searched thoroughly in the settings but no sight of this checkbox. I've seen no up-to-date tutorial to activate them. How can I do?

Thank you for your help.

JacopoStanchi
  • 1,962
  • 5
  • 33
  • 61

2 Answers2

9

Two methods in the devtools:

  1. Press Escape to show the drawer at the bottom. Choose menu > Sensors. At the bottom, set Touch = Force enabled.

  2. Turn on Device Toolbar (second button at the top). Choose menu > Add device type. Set it to either "Mobile" or "Desktop (touch)".

Both of these should enable touch events.

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
1

It should be a chrome flag. Type this address into the chrome URL bar:

chrome://flags/#touch-events

it should highlight the Touch Events API, after that just press the drop-down box and change it to enabled.enter image description here

Maxim Khanov
  • 434
  • 2
  • 8
  • 2
    This will enable detection by code like `"ontouchstart" in window`, not emulating the actual events with the mouse. – Josh Lee Dec 18 '18 at 04:43