404 Tech Support

Disable back/forward navigation swiping gestures in Google Chrome for Windows

I have previously created a managed kiosk using Google Chrome and was satisfied with the results. The kiosk has a touchscreen and no keyboard or mouse. A lot of things change having a touchscreen attached because Chrome includes built-in gestures. You can tap two finger to get a context menu (right-click). That was disabled with some Javascript on the site to disable right-clicking.

Another gesture showed swiping to left to right would cause the kiosk to only show a black screen. At first I had to figure out what this gesture was trying to accomplish. After playing around with it and figuring out how to reproduce the action, I found swiping from left-to-right would take me back a page and from right-to-left would take me forward in navigation, if I had previously gone back. So, the gestures were the equivalent of simple back and forward buttons.

For some reason, the back gesture would not consistently load the previous page. Perhaps this is due to the transitions on the site or some other cause. Either way, in the kiosk environment it made more sense to control navigation with what was available on-screen. Now that I had found what the swipes did, I just had to see if there was a way to control it.

I did not find any options in the settings for Chrome. Searching the web seemed to only show solutions for Chrome on Android or on Mac OS X with a Magic Trackpad or Macbook Air/Macbook Pro. After looking through the growing list of Chromium parameters/switches and now having some idea of what I was looking for, I finally found a switch I could use to disable the back/forward swiping gestures for Chrome on Windows.

–overscroll-history-navigation=0

Its description reads:

Enables or disables history navigation in response to horizontal overscroll. Set the value to ‘1’ to enable the feature, and set to ‘0’ to disable. Defaults to enabled.

I was able to add that command to the shortcut that launches Chrome and it successfully disabled the back/forward navigation swiping gestures.

“C:Program Files (x86)GoogleChromeApplicationchrome.exe” –kiosk –incognito http://www.404techsupport.com/ –overscroll-history-navigation=0