-
Notifications
You must be signed in to change notification settings - Fork 6k
[ios]enable the webview non tappable workaround by checking subviews recursively #57168
[ios]enable the webview non tappable workaround by checking subviews recursively #57168
Conversation
| [self removeGestureRecognizer:self.delayingRecognizer]; | ||
| [self addGestureRecognizer:self.delayingRecognizer]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this cause problems in the views they are gesturing into that are not WKWebViews?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is possible. That's something that we need to watch out for. But I highly doubt if it is gonna cause real issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are talking about an odd of combining:
- having a setup with webview + another non-web-view subview that also handles gesture
- having a flutter overlay layer on top of this non-web-view subview
- User touch the area inside non-web-view subview, but outside of the overlay layer
Then we will have this non-web-view subview receive the extra touch when it's not supposed to.
Then even when this happens, I don't think it is a huge problem.
|
I was able to verify this solution works in the sample project provided by the author of |
jmagman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
… subviews recursively (flutter/engine#57168)
…160220) flutter/engine@9b51e30...5eedfef 2024-12-13 [email protected] Normalize round rect bounds when coming from Flutter (flutter/engine#57171) 2024-12-13 [email protected] [ios]enable the webview non tappable workaround by checking subviews recursively (flutter/engine#57168) 2024-12-12 [email protected] removed c style casts and enabled the lint (flutter/engine#57162) 2024-12-12 [email protected] [Impeller] exploit perfect hash for SamplerDescriptor. (flutter/engine#57036) 2024-12-12 [email protected] Reenabled labelling test with a capabilities check. (flutter/engine#57160) 2024-12-12 [email protected] [Impeller] dont print format strings for blend filter and snapshots. (flutter/engine#57105) 2024-12-12 [email protected] Make fl_engine_send_key_event into a standard async function. (flutter/engine#57112) 2024-12-12 [email protected] Roll Fuchsia Linux SDK from HJ57Y3zxqDamI8qkY... to iWMEbVYaNdH8RJmXZ... (flutter/engine#57163) 2024-12-12 [email protected] Migrate FlPlatformChannel tests to FlMockBinaryMessenger (flutter/engine#57140) 2024-12-12 [email protected] Migrate FlBasicMessageChannel tests to FlMockBinaryMessenger (flutter/engine#57115) 2024-12-12 [email protected] Migrate layers and layer_tree to DisplayList/Impeller geometry classes (flutter/engine#57153) 2024-12-12 [email protected] [web] Use CanvasKit to run tests under engine/ (flutter/engine#54786) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from HJ57Y3zxqDam to iWMEbVYaNdH8 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR limits the search depth, because we don't want to enable this workaround for AdMob banner, which has a WKWebView in the depth of 7. See the previous PR for more context: #57168 I was able to confirm that this returns YES for the 3P plugin, and NO for AdMob. *List which issues are fixed by this PR. You must list at least one issue.* flutter/flutter#158961 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
… subviews recursively #57168 (#57172) CP for #57168 and #57193 *List which issues are fixed by this PR. You must list at least one issue.* flutter/flutter#158961 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
… AND "enable the webview non tappable workaround by checking subviews recursively #57168" (#57176) CP for 3 PRs: #56804 and #57168 and #57193 This is for 3.28. Since the previous PR was not merged, so I combined the 2 PRs to make it easier to merge. *List which issues are fixed by this PR. You must list at least one issue.* pichillilorenzo/flutter_inappwebview#2415 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…recursively (flutter/engine#57168) The original workaround ([PR](flutter/engine#56804)) works for the official web view plugin, but it doesn't work for a third party plugin `flutter_inappwebview` ([issue](https://github.com/pichillilorenzo/flutter_inappwebview)). Upon discussion with the author of that plugin, it turns out that their platform view is not a WKWebView, but rather a wrapper of WKWebView. This PR performs a DFS search of the view hierarchy, and enable the workaround as long as there's a WKWebView inside. TODO: pending sample project: I am quite positive that it should work, but **I haven't tried it since I don't have a sample project yet**. I have requested a sample project with them so I can verify the solution. *List which issues are fixed by this PR. You must list at least one issue.* pichillilorenzo/flutter_inappwebview#2415 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…er/engine#57193) This PR limits the search depth, because we don't want to enable this workaround for AdMob banner, which has a WKWebView in the depth of 7. See the previous PR for more context: flutter/engine#57168 I was able to confirm that this returns YES for the 3P plugin, and NO for AdMob. *List which issues are fixed by this PR. You must list at least one issue.* flutter#158961 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
… subviews recursively flutter#57168 (flutter#57172) CP for flutter#57168 and flutter#57193 *List which issues are fixed by this PR. You must list at least one issue.* flutter/flutter#158961 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
The original workaround (PR) works for the official web view plugin, but it doesn't work for a third party plugin
flutter_inappwebview(issue). Upon discussion with the author of that plugin, it turns out that their platform view is not a WKWebView, but rather a wrapper of WKWebView.This PR performs a DFS search of the view hierarchy, and enable the workaround as long as there's a WKWebView inside.
TODO: pending sample project:
I am quite positive that it should work, but I haven't tried it since I don't have a sample project yet. I have requested a sample project with them so I can verify the solution.
List which issues are fixed by this PR. You must list at least one issue.
pichillilorenzo/flutter_inappwebview#2415
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.