[whatwg] Proposal for non-modal versions of modal prompts
jochen at chromium.org
Mon Mar 19 13:38:56 PDT 2012
I'd like to put forward a proposal for extending the modal prompts
(alert/confirm/prompt) with an optional callback parameter. If the optional
immediately. The callback will be invoked when the dialog that doesn't need
to be browser modal now, is closed.
I wouldn't add such a callback to showModalDialog, as I think sites can use
e.g. window.open instead.
I've written up the proposal here: http://wiki.whatwg.org/wiki/Modal_prompts
The motivation for this is that in a tabbed browser, modal dialogs are
potentially disrupting the work flow of the user as they can't interact
with any other web site as long as the modal dialog is displayed.
Current browsers are having problems with the modal prompts:
Chromium for example doesn't display a window created by showModalDialog in
a modal way: http://crbug.com/16045
WebKit and Firefox don't suppress events while a modal dialog is running:
Firefox displays modal prompts as tab-modal. However, it's possible to
https://bugzilla.mozilla.org/show_bug.cgi?id=727397 and the prompts from
separate tabs can block each other:
Feedback on this proposal would be highly appreciated!
More information about the whatwg