NativeScript / android

NativeScript for Android using v8
https://docs.nativescript.org/guide/android-marshalling
Apache License 2.0
525 stars 135 forks source link

pinch zoom troubles #1827

Open ray007 opened 1 week ago

ray007 commented 1 week ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

Describe the bug

My app contains a webview (using @nativescript-community/ui-webview), which was zoomable with pinch-zoom until my last update of @nativescript/android, which with needed because of another problem with new Pixel phones. Many/most touch events do not seem to reach the website in the webview anymore, pinch-zoom has become impossible.

Expected behavior Using 2 fingers to zoom works as it always did.

Sample project

I'm currently trying to do a small sample project on nativescript preview, but I can't get the webview to show there. Will update the issue here once I get a working sample on nativescript preview or play. Does anyone know of a sample I could fork/test with?

If anyone wants to take a look at my current attempt: https://stackblitz.com/edit/nativescript-stackblitz-templates-fblndg?file=app%2Fcomponents%2FHome.vue

Additional context

I know that not all modules list above are in their newest versions, for a patch release of our product I wanted to make as few changes as possible. Updating all of them to their newest version did not change anything.


Update: I redid the same project locally and it works as intended with ns debug android. Then trying ns preview also does not show the webview in the preview app.

To recreate locally: create a blank vue app and replace the

ray007 commented 3 days ago

Update: I have verified a pinch event arrives at the webview, but logging the pointerdown events inside the webview, there is only one at the first touch, but none for the second.

The only other change I made was bumping the targetSdk to 34 as required by Google.

ray007 commented 2 days ago

Info Update: although pinch-zoom broke when only updating @nativescript/android, a simple test page with the standard WebView still seems to do pinch-zoom fine, while using AWebView (from @nativescript-community/ui-webview, vue variant) does not.