W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] prompts, alerts and showModalDialog during beforeunload/unload events

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 11 Feb 2010 20:55:28 -0600
Message-ID: <dd0fbad1002111855q3a95895dr23300eb6e1331776@mail.gmail.com>
On Thu, Feb 11, 2010 at 8:25 PM, Ojan Vafai <ojan at chromium.org> wrote:
> Currently, modal dialogs that fire during beforeunload/unload events are
> used to confuse users into not being able to leave websites (e.g. to tell
> the user to click on the wrong button for in the browser's beforeunload
> alert dialog). They also add a layer of complexity to browser shutdown
> behavior.?I can't think of any legitimate use-case for opening a modal
> dialog when a user is trying to navigate away from a page.
> Proposal: Opening a modal dialog during beforeunload/unload should either
> throw an error or just silently fail.

I commonly see them put to *good* use by editting applications,
warning you if you attempt to leave the page without saving.  It has
saved me from accidentally lost effort just in the past few days in
both my email and one of my wikis.

~TJ
Received on Thursday, 11 February 2010 18:55:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC