Skip to content

[Android] button actions in webview_flutter are blocked #169486

Closed

Description

@letrungdo

Steps to reproduce

  1. Open the screen containing the webview
  2. 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!

Activity

  1. letrungdo commented on May 27, 2025

    @letrungdo
    ContributorAuthor

    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

  2. darshankawar commented on May 27, 2025

    @darshankawar
    Member

    You can reproduce it on this repo:
    https://github.com/letrungdo/flutter_webview_issue

    @letrungdo This repo isn't available as I get 404.

    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

    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 ?

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2025
  4. letrungdo commented on May 27, 2025

    @letrungdo
    ContributorAuthor

    @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

  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2025
  6. darshankawar commented on May 27, 2025

    @darshankawar
    Member

    @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 ?

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2025
  8. letrungdo commented on May 27, 2025

    @letrungdo
    ContributorAuthor

    @darshankawar
    wasn't able to tap on any action buttons
    That'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

  9. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2025
  10. darshankawar commented on May 28, 2025

    @darshankawar
    Member

    Ok, thanks for the update. With that explaination, I was able to replicate the reported behavior.

    stable : 3.32.0
    master : 3.33.0-1.0.pre.238
    
  11. added
    platform-androidAndroid applications specifically
    packageflutter/packages repository. See also p: labels.
    on May 28, 2025
  12. 7 remaining items

  13. self-assigned this
    on Jun 3, 2025
  14. kondo-masaki commented on Jun 28, 2025

    @kondo-masaki

    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:

    • Whether this is being investigated
    • If there's a known workaround we can implement
    • Rough timeline for a fix

    Thanks for your hard work on Flutter! 🙏

  15. flutter-triage-bot commented on Oct 7, 2025

    @flutter-triage-bot

    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!

  16. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Oct 7, 2025
  17. gmackall commented on Nov 14, 2025

    @gmackall
    Member

    I believe this was fixed by #177572

    Please re-open if you experience otherwise!

  18. letrungdo commented on Nov 14, 2025

    @letrungdo
    ContributorAuthor

    @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.

    Image

    I wonder if this fix will be available in the upcoming flutter 3.38.x version?

  19. added
    r: fixedIssue is closed as already fixed in a newer version
    on Nov 14, 2025
  20. gmackall commented on Nov 14, 2025

    @gmackall
    Member

    @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.

  21. letrungdo commented on Nov 14, 2025

    @letrungdo
    ContributorAuthor

    @gmackall Thanks for useful information.
    I used fvm use master and tested again, the bug is still not fixed
    I 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.

  22. letrungdo commented on Nov 14, 2025

    @letrungdo
    ContributorAuthor

    @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

  23. github-actions commented on Nov 28, 2025

    @github-actions

    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 -v and a minimal reproduction of the issue.

  24. locked as resolved and limited conversation to collaborators on Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⏳Bot is counting down the days until it unassigns the issueP1High-priority issues at the top of the work listfound in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions