Created
July 16, 2022 21:22
-
-
Save rileypaulsen/13be8d935d1bf1e0200f95077d8b6604 to your computer and use it in GitHub Desktop.
Disables pinch zoom on mobile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(window.TouchEvent) { | |
document.addEventListener('touchmove', (event) => { | |
if(event.scale !== 1) { | |
event.preventDefault(); | |
} | |
}, false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment