[ios] Stop transaction sheet coordinators if cant present
This is to avoid zombie coordinators (crbug.com/355237262) that result in preempting the keyboard on form fields because the listeners that auto-blur these fields are never detached. The patch we did in http://crrev.com/c/5740135 doesn't prevent all zombie coordinators. Probably because `presentedViewController` isn't always the baseViewController. A better approach is to just cleanup the coordinator if there is no `presentingViewController` after calling -presentViewController which means that the bottom sheet couldn't be presented hence the coordinator isn't valid. `presentingViewController` is set iff the view controller is being presented, so `presentingViewController` will be nil if there is already a presented view controller that prevents presenting the view controller for the bottom sheet. With this approach, there will be attempts to show the bottom sheet until the bottom sheet can be presented, which will give the opportunity to detach the listeners through the bottom sheet. NO_IFTTT=we've done the update but this doesn't prevent the error Change-Id: I9b35c5885221f7f9ede747ad484da5e97e840ab2 Bug: 355237262 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5816436 Reviewed-by:Tommy Martino <tmartino@chromium.org> Reviewed-by:
Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by:
Federica Germinario <fedegermi@google.com> Commit-Queue: Vincent Boisselle <vincb@google.com> Cr-Commit-Position: refs/heads/main@{#1349241}
Loading
Please register or sign in to comment