Search code examples
javascriptjquerycssgoogle-chromewindow

Google chrome - disable pinch zoom


I have a kiosk in train station public place and in airport.

Random people needs to use the touch screen application which is running on Google chrome. When the user apply unpinch or pinch action on Google chrome then Google chrome makes abnormal zoomed in screen and leaves the screen zoomed in forever, and then i get call that my application do not work.

enter image description here

Using chrome://flags/#enable-pinch in past Google chrome was able to kill the pinch but now in new version they removed that feature also following options none of them works anymore like it used to work in past with``chrome://flags/#enable-pinch`

chrome://flags/#touch-events - if i disable this it disable whole touch inputs on Google chrome

<meta name="viewport" content="width=device-width, user-scalable=no"> - if i apply this it has no effect on Google chrome, still pinch/unpinch attacks occure

Therefore, i kept trying all other possible way to resolve it

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

I am pulling all my hair out because all options are failing.

Can anyone please advise how to resolve it? How do i absolutely disable the pinch/unpinch on Google chrome or on whole operating system? I also tried control panel but none of the control panel showing an option where it says disable pinch/unpinch attacks.

// Dear God, please give me a Pinch disable option for, Google chrome. Its a nightmare, nothing stops pinch zoom actions.
window.addEventListener("touchstart", touchHandler, false);
function touchHandler(event){
    if(event.touches.length > 1){
      console.log("pinch "); // detected
      window.location.reload();// detected
      try {
        event.preventDefault(); // FAIL FAIL FAIL FAILLLLLLLL ???????????
        return false;
      }catch(eee) {
      }
    }
    else {
      console.log("pinch not");//detected
    }
}

Solution

  • ANSWER: 2018

    I've been trying to solve the same issue with a kiosk application. I've tried meta tags and touch events but nothing on the application side would work for me.

    In the end the solution I found was disabling pinch from the command line when booting up Chrome in kiosk mode

    Here's an example:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --start-fullscreen  --kiosk 
    --disable-pinch  http://127.0.0.1:1000