flutter_webview_plugin
flutter_webview_plugin copied to clipboard
Expected behaviour of withZoom?
hey,
I am aware that with the recent version, we now have WKWebView with this plugin for iOS. However I for one would love to disable zooming altogether (pinch, doubletap). It seems that 'withZoom: false' doesn't make any difference for zooming at all (fullscreen WebView with flutter navigation). At least when I tested this on iOS/sim.
Any hints what to look for? Thanks!
Any update?
An update for anybody late to the party:
I disabled all zooming in ios by doing the following:
Setting withZoom:false on the widget.
Setting <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
And setting up the following js on the loaded page:
document.addEventListener("touchstart", function (event) {
if (event.touches.length > 1) {
event.preventDefault();
event.stopPropagation();
}
}, {
passive: false
});
isn't there any other way to disable the zoom without involving javascript/html ? I don't have control over the website