Skip to content

Commit

Permalink
Document FXIOS-10334 ToDo's for forthcoming JS alert refactors (#22662)
Browse files Browse the repository at this point in the history
Add ToDo comments per 10/18 incident reverts and related FXIOS-10334 ticket
  • Loading branch information
mattreaganmozilla authored Oct 21, 2024
1 parent fa7ef1c commit 981c08f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ extension BrowserViewController: WKUIDelegate {
logger.log("Javascript message alert will be presented.", level: .info, category: .webview)

present(messageAlert.alertController(), animated: true) {
// TODO: [FXIOS-10334] This should be called when the alert is dismissed, not presented
completionHandler()
self.logger.log("Javascript message alert was completed.", level: .info, category: .webview)
}
} else if let promptingTab = tabManager[webView] {
logger.log("Javascript message alert is queued.", level: .info, category: .webview)

promptingTab.queueJavascriptAlertPrompt(messageAlert)
// TODO: [FXIOS-10334] This should be called when the alert is dismissed, not enqueued
completionHandler()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ class BrowserViewController: UIViewController,
// Ensure the layout is updated immediately
view.layoutIfNeeded()

// TODO: [FXIOS-10334] Needs investigation. Dequeuing JS alerts as part of subview layout is problematic.
showQueuedAlertIfAvailable()
switchToolbarIfNeeded()
adjustURLBarHeightBasedOnLocationViewHeight()
Expand Down

0 comments on commit 981c08f

Please sign in to comment.