Skip to content

[webview_flutter][iOS] Platform view stops receiving touches after the first interaction on iOS 26 #191267

Closed
flutter/packages
#12496

Description

@burakJs

Steps to reproduce

Open a WebViewWidget on iOS 26 and interact with the page. The first touch is delivered normally; every touch after it is swallowed and the web view never receives another event for the rest of its lifetime.

I have not been able to reduce this to a minimal repro yet — the page that triggers it reliably for us is a third-party payment cashier whose form page embeds four cross-origin iframes and is taller than the viewport. Filing anyway because the measurements below point at a specific code path, and because the same failure reproduces with a second, independent webview plugin.

Expected results

Touches keep being delivered to the web view.

Actual results

After the first interaction the web view stops receiving touches entirely.

What I measured

I instrumented both sides to find where the touch is lost.

Flutter side — a Listener wrapping WebViewWidget logs every pointer event. It sees all of them:

FLUTTER-POINTER PointerDownEvent global=205,302 local=205,187
FLUTTER-POINTER PointerDownEvent global=291,288 local=291,173
FLUTTER-POINTER PointerDownEvent global=248,390 local=248,275

Listener defaults to HitTestBehavior.deferToChild, so the fact that it fires at all proves the platform view was hit.

Page side — a capture-phase listener on document logs touchstart / pointerdown / click. It receives nothing for any of the touches above. Injected JS run from Dart at the same coordinates confirms real, top-document elements are under the finger (not a cross-origin iframe, not an overlay):

PROBE-AT 205,187 stack=DIV.error.hide > DIV.input-item > FORM > DIV > DIV.pci-container
PROBE-AT 251,475 stack=DIV.billing-info-container > DIV.pay-fields-container > DIV.col-wrapper

The page is healthy — a setInterval heartbeat keeps firing, there are no JS errors, no failed requests, and onReceivedError / onReceivedHttpError stay silent.

The native scroll view is not receiving touches either — the document is scrollable (scrollHeight/clientHeight = 877/783) and drag gestures were performed, but window.scrollY never moved off 0. Scrolling needs no DOM events, so this rules out the page swallowing them.

The first interaction works. On the preceding page of the same web view (which happens to be exactly viewport height, 783/783) a tap produced the full sequence:

POINTERDOWN t=2569 ... TOUCHSTART ... TOUCHEND ... CLICK

Everything after that is dead.

Reproduces on

Platform Result
iOS 26.3 simulator broken
iOS 26.4 simulator broken
iOS 26.6 device (iPhone 14 Pro Max) broken

Also reproduces with flutter_inappwebview 6.1.5 on the same page. Both plugins register their platform view without specifying a policy, so both get the default eager.

Code that looks related

ForwardingGestureRecognizer.forceResetStateIfNeeded returns early on iOS 26 and above:

- (void)forceResetStateIfNeeded {
  // Apple fixed the bug where the gesture recognizer gets stuck at "failed" state in iOS 26.
  // The workaround is no longer needed on iOS 26+.
  // See: https://github.com/flutter/flutter/issues/179907
  if (@available(iOS 26.0, *)) {
    return;
  }
  ...
}

That safety net was removed based on a unit-test observation in #179907 (the recognizer reported .possible instead of .failed on iOS 26). The eager policy still installs the delaying recognizer, so if the recognizer does get stranded there is nothing left to recover it. The symptom matches the description in #136244 verbatim: "the gesture is not reset to 'possible' state and is stuck on 'failed' state, which causes subsequent touches to be blocked."

This is a hypothesis from reading the source, not something I instrumented natively — but it is consistent with every measurement above, and with the workaround below.

Workaround

Registering the platform view with FlutterPlatformViewGestureRecognizersBlockingPolicyDoNotBlockGesture fixes it completely on all three OS versions listed above. That policy does not install the delaying recognizer, so there is no recognizer state to strand; blocking still happens, via hitTest.

PR for webview_flutter_wkwebview: flutter/packages#12496

Flutter Doctor output

Flutter 3.47.0 • channel stable
Framework revision 4cf2416426 • 2026-08-11
Engine hash 59d54a2b2896a6bbf356c94b7fac7b9e235bdacd (revision 5f77625673)
webview_flutter 4.14.1
webview_flutter_wkwebview 3.26.0
Xcode / macOS 26.5.1

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-iosiOS applications specifically
    engineflutter/engine related. See also e: labels.
    a: platform-viewsEmbedding Android/iOS views in Flutter apps
    fyi-ecosystemFor the attention of Ecosystem team
    team-iosOwned by iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Aug 18, 2026
  2. mbcorona commented on Aug 18, 2026

    @mbcorona
    Member

    Thanks for the report and PR linked 12496, routing to the iOS team for evaluation.

  3. hellohuanlin commented on Aug 19, 2026

    @hellohuanlin
    Contributor

    The recent non-tappable web view workaround was skipped on iOS 26.4. But this bug happens on iOS 26.3, 26.4 & 26.6, this is potentially a new bug in WKWebView.

    The forceResetStateIfNeeded workaround you quoted was introduced to deal with a different bug related to iPad pencil, but your experiment runs on iPhone.

    I'm glad that our newly introduced doNotBlockGesture policy works. However, this policy is designed as the last resort to deal with bugs of the platform view itself (e.g. WKWebView). So it would be great if you can provide a reproducible project so we can look further (e.g. file a bug with Apple).

  4. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    and removed
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Aug 20, 2026
  5. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Aug 27, 2026
  6. added a commit that references this issue on Oct 2, 2026
    d8b4304
  7. github-actions commented on Oct 15, 2026

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

  8. locked as resolved and limited conversation to collaborators on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsengineflutter/engine related. See also e: labels.found in release: 3.47Found to occur in 3.47platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions