On Sun, Jun 26, 2011 at 1:53 PM, Sreeram Ramachandran
<sree...@chromium.org>wrote:

> On Sun, Jun 26, 2011 at 13:40, Ryosuke Niwa <rn...@webkit.org> wrote:
> > On Sun, Jun 26, 2011 at 1:37 PM, Ryosuke Niwa <rn...@webkit.org> wrote:
> >>
> >> On Sun, Jun 26, 2011 at 1:34 PM, Sreeram Ramachandran
> >> <sree...@chromium.org> wrote:
> >>>
> >>> A confirm() can't actually do the first option ("Don't leave"). I
> >>> believe there's nothing a page can do to prevent the navigation once
> >>> it is in unload. The only way it can prevent it is by installing a
> >>> beforeunload and returning a string.
> >>
> >> Right.  So a web page can first ask whether a user wants to save states
> or
> >> not.  Then ask whether a user really wants to leave a page or not using
> >> beforeunload.
> >
> > To further clarify, it doesn't even have to use beforeunload.  The
> important
> > thing is that if we disallow confirm in beforeunload, unload, etc... then
> > web apps will have no way of asking a user if he/she wants to save
> states.
>
> The problem is that if we disallow alerts, but not confirm/prompt,
> webpages will just gravitate to using confirm() to annoy the user. As
> I said, the only uses of confirm() I actually saw were of this type
> already. Those who wanted to save state are already doing it without
> asking the user for explicit confirmation.
>
> If the argument is purely that somebody _might_ want to use it, since
> confirm/prompt functionality can't be exactly duplicated in another
> way, then I submit the case of showModalDialog(). Certainly you can do
> things with showModalDIalog() (such as popping up a form with the
> state, allowing the user to edit and submit) that can't be done with
> alert/confirm/prompt. However, we already disallow these, since by
> default, popup blocking kills these. I don't see anybody championing
> the need of developers to be able to use showModalDialog, because we
> recognize that they are extremely annoying, especially when you are
> trying to leave a page.


Thanks for gathering that data.

It sounds to me like the next step is to push out a version of Chrome to the
dev channel that
disallows alert, confirm, prompt during unload and beforeunload.  Then,
let's see if we get any
bugs filed against Chrome by users who feel that this change impairs their
usage of a web site.

I suspect the only bug reports we might see would come from web developers,
who miss this
ability to nag users.

-Darin
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to