flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

Expected behaviour of withZoom?

Open marrrc opened this issue 7 years ago • 3 comments

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!

marrrc avatar Jun 20 '18 08:06 marrrc

Any update?

longravuth avatar Oct 08 '19 21:10 longravuth

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
                });

fideldonson avatar Mar 31 '20 18:03 fideldonson

isn't there any other way to disable the zoom without involving javascript/html ? I don't have control over the website

albert0m avatar Nov 30 '21 13:11 albert0m