Under the current UIAlertController-based implementation of AlertCoordinator, JavaScript dialogs are displayed modally. This means that when a dialog is displayed, no other actions in the app can occur until it is dismissed. This is a sub-optimal solution because a user may want to switch Tabs or close the Tab presenting the dialog. Safari on iOS displays JavaScript dialogs that are only modal for the content area of the responsible Tab, meaning that you can still interact with other controls in the UI.
To fix this we need to:
1) Contact UX for both iOS and Android to verify that this behavior is indeed desired for mobile Chrome. The current implementation simply switches the current Tab to be the one presenting the dialog, then shows the dialog modally over the whole app.
2) Update MDC dialogs to be displayed non-modally, so we can present them as child view controllers for the content area of the Tab attempting to show the dialog.
3) Rearchitect our UIViewController hierarchy such that a view controller is used to display the web page's content area. Currently, a single UIViewController is used to display the entire browser UI, including toolbars and tab switcher buttons.
4) Display non-modal MDC dialogs as child view controllers of the content area view controller.
Comment 1 by kkhorimoto@chromium.org
, Dec 15 2016