Skip to content

[ios] Skip non-tappable web view workaround for iOS 26.4 #185372

Closed

Description

@hellohuanlin

Apple fixed the non-tappable web view bug on iOS 26.4. This means we can skip the hacky workarounds on iOS 26.4

// On iOS 18.2, WKWebView's internal recognizer likely caches the old state of its blocking
// recognizers (i.e. delaying recognizer), resulting in non-tappable links. See
// https://github.com/flutter/flutter/issues/158961. Removing and adding back the delaying
// recognizer solves the problem, possibly because UIKit notifies all the recognizers related
// to (blocking or blocked by) this recognizer. It is not possible to inject this workaround
// from the web view plugin level. Right now we only observe this issue for
// FlutterPlatformViewGestureRecognizersBlockingPolicyEager, but we should try it if a similar
// issue arises for the other policy.
if (@available(iOS 26.0, *)) {
// This performs a nested DFS, with the outer one searching for any web view, and the inner
// one searching for a TouchEventsGestureRecognizer inside the web view. Once found, disable
// and immediately reenable it to reset its state.
// TODO(hellohuanlin): remove this flag after it is battle tested.
NSNumber* isWorkaroundDisabled =
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"FLTDisableWebViewGestureReset"];
if (!isWorkaroundDisabled.boolValue) {
[self searchAndFixWebView:self.embeddedView];
}
} else if (@available(iOS 18.2, *)) {
// The 1P web view plugin provides a WKWebView itself as the platform view. However, some 3P
// plugins provide wrappers of WKWebView instead, and AdMob banner has a WKWebView at
// depth 7. So we perform DFS to search the view hierarchy.
if ([self containsWebView:self.embeddedView]) {
[self removeGestureRecognizer:self.delayingRecognizer];
[self addGestureRecognizer:self.delayingRecognizer];
}
}

Activity

  1. added
    c: tech-debtTechnical debt, code quality, testing, etc.
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Apr 23, 2026
  2. github-actions commented on Jul 14, 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.

  3. locked as resolved and limited conversation to collaborators on Jul 14, 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 appsc: tech-debtTechnical debt, code quality, testing, etc.platform-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