Repository navigation
[ios] Skip non-tappable web view workaround for iOS 26.4 #185372
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Apple fixed the non-tappable web view bug on iOS 26.4. This means we can skip the hacky workarounds on iOS 26.4
flutter/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm
Lines 653 to 679 in 8787e42
| // 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]; | |
| } | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsEmbedding Android/iOS views in Flutter appsc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Activity
[pv]skip non-tappable web view workaround on ios 26.4 (flutter#185424)
[pv]skip non-tappable web view workaround on ios 26.4 (flutter#185424)
github-actions commentedon Jul 14, 2026
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.