I'm developing a pinch zoom feature for a mobile app written in javascript and I want to test this in Google Chrome with the mobile device emulation feature. But I cannot find a way to test a pinch gesture.
I tried everything I could find on the internet (pressing Shift and moving the mouse, pressing Alt and moving the mouse), but none of this worked. Is there even a "native" way in Google Chrome to simulate a pinch zoom gesture?
btw I'm using the MacOs version of Google Chrome version 59.0.3071.86
Hold down Shift then click and move your mouse to emulate pinch zooming.
Click the cog icon to open up it's settings. Then switch to the Overrides tab. Make sure Enable is checked and then activate Emulate touch events. You're done.
I just went from a MacBook to an iMac, and this was a frustrating thing to figure out without a trackpad. Just hold down the option key and use one finger on your magic mouse moving up and down. This will "pinch zoom" as your MacBook with trackpad does.
Shift + mouse click & drag across the viewport
Works for me. Only problem is that the touchstart
event will return 1
for originalEvent.touches
On Chrome v.71.x.x, you can pinch zoom pressing 'Toggle Device toolbar' at dev tools and after hold SHIFT and click-drag your mouse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With