Suppressing Dialogs on Background Tabs

Hi, I’m Tony Schreiner, and as you may recall from an earlier post I work on the tabbed browsing architecture in IE7.

One of the new features in the IE7 Beta 2 Preview is the ability to suppress modal dialogs from background tabs. This addresses one common problem with tabbed browsing where a web site on a background tab can launch a dialog that must be immediately dealt with by the user. Even worse than the interruption is the risk that the user will not realize the dialog came from a background tab, and may act on that dialog as if it belonged to the active tab.

Instead of disrupting the user by immediately switching to the tab trying to show the dialog – or blocking it altogether – IE7’s approach is to provide a user experience that’s similar to the Taskbar on Windows. When a background tab attempts to show a dialog we temporarily suppress the dialog by suspending the code trying to show it and then flashing the tab yellow a few times to notify the user:

Tab Flashing

The user can ignore this notification and continue to browse, and when the tab is eventually selected the dialog will automatically be shown in the context of the page that launched it.

Currently we suppress script-initiated dialogs such as showModalDialog() and most dialogs of other types. As part of our standard threat model analysis we are continuing to review and address scenarios where dialogs from background tabs could still be displayed, especially when launched by script within a web page. We also suppress dialogs launched from add-ons and ActiveX controls, but only if they can be detected as belonging to a background tab.

 - Tony Schreiner