Repository navigation
[Android] button actions in webview_flutter are blocked #169486
Copy link
Copy link
Closed
Labels
⏳Bot is counting down the days until it unassigns the issueBot is counting down the days until it unassigns the issueP1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
- Open the screen containing the webview
- Use 2 or more fingers to zoom in and out of the map
Expected results
After zooming in and out, tap the buttons work normally.
Actual results
Tap the buttons and no action will happen.
Code sample
You can reproduce it on this repo:
https://github.com/letrungdo/flutter_webview_issue
I have wrapped the WebViewWidget in SingleTouchContainer for easy reproducibility. If I remove it it will be harder to reproducible and it still has the issue on
Screenshots or Video
Screen.Recording.2025-05-27.at.13.35.58.mp4
Logs
No logs
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.32.0, on macOS 15.4.1 24E263 darwin-arm64, locale en-JP) [290ms]
• Flutter version 3.32.0 on channel stable at /Users/letrungdo/fvm/versions/3.32.0
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision be698c48a6 (7 days ago), 2025-05-19 12:59:14 -0700
• Engine revision 1881800949
• Dart version 3.8.0
• DevTools version 2.45.1
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.5s]
• Android SDK at /Users/letrungdo/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at:
/Users/letrungdo/Library/Java/JavaVirtualMachines/corretto-17.0.13/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment Corretto-17.0.13.11.1 (build 17.0.13+11-LTS)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [719ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16E140
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [12ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.2) [11ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
[✓] VS Code (version 1.100.2) [10ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.110.0
[✓] Connected device (5 available) [6.0s]
• S6 KC (mobile) • 5849014604 • android-arm64 • Android 12 (API
31)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 15 (API
35) (emulator)
• Do’s iPhone (wireless) (mobile) • 00008140-001815992EEB001C • ios • iOS 18.5 22F76
• macOS (desktop) • macos • darwin-arm64 • macOS 15.4.1
24E263 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome
136.0.7103.114
[✓] Network resources [302ms]
• All expected network resources are available.
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
⏳Bot is counting down the days until it unassigns the issueBot is counting down the days until it unassigns the issueP1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfound in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
letrungdo commentedon May 27, 2025
This bug only occurs from flutter version 3.19. Flutter version 3.16.9 works perfectly.
I think it's related to this bug: #144278
Then I created a new build of the android engine from flutter version 3.24.5 in the following commit and fixed the above problem:
https://github.com/flutter/engine/compare/3.24.5...letrungdo:flutter_engine:flutter_3.24.5?expand=1
fix: gesture blocked in android webview after zoom
darshankawar commentedon May 27, 2025
@letrungdo This repo isn't available as I get 404.
3.24.5 is still an old version. Have you also checked running the code on latest stable (3.32.0) and does it replicate on it ?
letrungdo commentedon May 27, 2025
@darshankawar Thanks for your feedback, version 3.32.0 has the same error.
I have set publish for this repo: https://github.com/letrungdo/flutter_webview_issue
darshankawar commentedon May 27, 2025
@letrungdo I cloned the repo and ran it in S10+ device (Android 11) with latest stable version but I wasn't able to tap on any action buttons as shown in video:
Screen_Recording_20250527_161545.mp4
Anything am I missing to properly replicate it ?
letrungdo commentedon May 27, 2025
@darshankawar
wasn't able to tap on any action buttonsThat's what I need to say in this issue. You have reproduced it.
If when opening the app you don't zoom the map, you will be able to tap the buttons
darshankawar commentedon May 28, 2025
Ok, thanks for the update. With that explaination, I was able to replicate the reported behavior.
7 remaining items
kondo-masaki commentedon Jun 28, 2025
Hi team,
We're experiencing this issue in our production app. After users use pinch-to-zoom in WebView, all button interactions become completely unresponsive, forcing users to restart the app.
This issue has been labeled as P1 for a month now. Could someone from the team provide an update on:
Thanks for your hard work on Flutter! 🙏
flutter-triage-bot commentedon Oct 7, 2025
This issue is assigned to @gmackall but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
fix: gesture blocked in android webview after zoom (#177572)
gmackall commentedon Nov 14, 2025
I believe this was fixed by #177572
Please re-open if you experience otherwise!
letrungdo commentedon Nov 14, 2025
@gmackall Thank you so much!
I'm still waiting for engine-flutter-autoroll to merge the PR engines, but it seems that the master branch has not yet applied the engine of this fix.
I wonder if this fix will be available in the upcoming flutter 3.38.x version?
gmackall commentedon Nov 14, 2025
@letrungdo Since the merge of flutter/engine into flutter/flutter, you no longer need to wait for engine changes to be rolled in. The master branch should currently contain this fix (the roller you are linking there is rolling the flutter version in use in the flutter/packages repo).
It missed the cut for 3.38.1, but I can look in to seeing if we can cherry pick this into 3.38.2. It is a somewhat risky change though, so not sure if it will be approved.
letrungdo commentedon Nov 14, 2025
@gmackall Thanks for useful information.
I used
fvm use masterand tested again, the bug is still not fixedI tried rebuilding the engine in the master branch but the result is still the same.
Before when creating PR # 177572, I rebuilt the engine and tested, everything was OK.
But it seems that there is some change that makes my PR fix no longer worked.
I will investigate the cause again.
letrungdo commentedon Nov 14, 2025
@gmackall This PR #178015 broke my fix, I tried revert the packages/flutter/lib/src/services/platform_views.dart file and everything worked as expected
fix: gesture blocked in android webview after zoom (flutter#177572)
github-actions commentedon Nov 28, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.