Skip to content
Commit 160a5c31 authored by vincb's avatar vincb Committed by Chromium LUCI CQ
Browse files

[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: default avatarTommy Martino <tmartino@chromium.org>
Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarFederica Germinario <fedegermi@google.com>
Commit-Queue: Vincent Boisselle <vincb@google.com>
Cr-Commit-Position: refs/heads/main@{#1349241}
parent dffeeec7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment