apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 988 forks source link

Impossible to disable pinch zooming in my app #1054

Closed brunoPert closed 3 years ago

brunoPert commented 3 years ago

Bug Report

Problem

I've already set all the required settings in order to disable zooming in my cordova app, but I'm still able to do it:

https://user-images.githubusercontent.com/49445815/103931669-71bc9900-50ff-11eb-8e4b-7d13435ba584.mp4

I've tried so far:

EnableViewportScale = true +

handling touchmove event, with passive: false (which works), but it blocks app scrolling.

What is expected to happen?

App shouldn't zoom in.

What does actually happen?

App zooms in

Environment, Platform, Device

Device: iphone 8. ios: 14.3.

Version information

cordova-ios: 6.1.1. cordova: 10. Xcode: 12.3.

Checklist

brunoPert commented 3 years ago

Fixed with:

document.addEventListener('gesturestart', (event) => { event.preventDefault(); }, false);