-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Description
As discussed in https://github.com/mozilla-mobile/firefox-ios/pull/23757#discussion_r1904514229 and https://docs.google.com/document/d/1g4xn4CSDBqS5zfb7PdDIJES6iO8pQ_uKscTCxx_tvDE/edit?tab=t.0
✅ Ticket Action Items
Remove JS alert dequeue called from BVC viewDidLayoutSubviews and move it elsewhere
- This UI func is not a good place to be performing an alert dequeue
- It was added there as a way to dequeue the alert. It’s a way to smash that dequeue alert function until one of them is called at the right time and place, since we don’t have a reliable way to detect when BVC is shown if we, for example, select a tab from the tab tray and an alert should be shown.
- We cannot rely at the moment on
viewDidAppearandviewWillAppearmethods in BVC to know when the BVC is shown to the user. Example is when the tab tray is shown on iPhone, those lifecycle methods are not called since the tab tray is not shown full screen. tabManager(:didSelectedTabChange)is too early and we cannot show the alert since the tab tray is still on screen when the alert is attempted to be shown, which result in this error:Attempt to present <Client.NewJSPromptAlertController: 0x12c808e00> on <Client.RootNavigationController: 0x10e809c00> (from <Client.BrowserViewController: 0x10d82ce00>) which is already presenting <Client.DismissableNavigationViewController: 0x10d940800>
┆Issue is synchronized with this Jira Task
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels