Disable Chrome pinch zoom for use in kiosk -
we using chrome in kiosk mode , accidentally users causing application zoom recent addition of pinch zoom support. think they've broken , walk away leaving application (and subsequently 55" touch screen) in broken state.
now thing work has been stopping event propagation touch events on 2 points. issues can't multitouch apps in case , if act fast browser reacts before javascript. in our tests still happen on accident users.
i've done meta tags, not work. wish disable chrome zooming @ cant find way that.
how can stop browser zooming?
we've had similar problem, manifests browser zooming javascript receiving no touch event (or single point before zooming starts).
we've found these possible (but possibly not long-term) solutions:
1. disable pinch / swipe features when using kiosk mode
if these command-line settings remain in chrome, can following:
chrome.exe --kiosk --incognito --disable-pinch --overscroll-history-navigation=0
- --disable-pinch - disables pinch-to-zoom functionality
- --overscroll-history-navigation=0 - disables swipe-to-navigate functionality
2. disable pinch zoom using chrome flags chrome://flags/#enable-pinch
navigate url chrome://flags/#enable-pinch in browser , disable feature.
the pinch zoom feature experimental turned on default means force-enabled in future versions. if you're in kiosk mode (and control hardware/software) toggle setting upon installation , prevent chrome updates going forward.
there roadmap ticket removing setting @ chromium issue 304869.
the fact browser reacts before javascript can prevent bug , has been logged @ chromium bug tracker. fixed before feature permanently enabled or fingers-crossed they'll leave setting.
3. disable touches, whitelist elements , events matching app
in tests we've conducted, adding preventdefault() document stops zooming (and other swipe/touch events) in chrome:
document.addeventlistener('touchstart', function(event){ event.preventdefault(); }, {passive: false});
if attach touch-based functionality higher in dom, it'll activate before bubbles document's preventdefault() call. in chrome important include eventlisteneroptions parameter because of chrome 51 document-level event listener set {passive: true}
default.
this disables normal browser features swipe scroll though, have implement yourself. if it's full-screen, non-scrollable kiosk app, maybe these features won't important.
This Google chrome kiosk mode is very nice and helpful app for all education centers. Thanks for providing nice info.
ReplyDelete