confirm() checkbox "Prevent this page from creating additional dialogs" is confusing for users

RESOLVED INACTIVE

Status

()

Core
DOM: Core & HTML
RESOLVED INACTIVE
2 years ago
2 days ago

People

(Reporter: Jo Liss, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
If you call the JavaScript confirm() function more than once in quick succession, Firefox will helpfully offer a checkbox saying "Prevent this page from creating additional dialogs".

This checkbox causes a surprising UX problem:

A developer seeing the checkbox will likely understand that it's a Firefox feature to stop misbehaving web pages from continuously stealing focus.

However, many users will interpret it to mean "Don't ask me again". For example, say a web app has a "remove" button that runs `confirm('Do you really want to remove this item?')`.

1. User clicks "remove" on item 1.
2. confirm() dialog pops up, user clicks "OK".
3. User clicks "remove" on item 2.
4. confirm() dialog pops up again, offering "Prevent this page from creating additional dialogs."
5. User thinks, "I'll check this box so it won't ask me for confirmation again as I remove more items" - checks box and clicks OK.
6. User clicks "remove" on item 3.
7. confirm() doesn't show a dialog and immediately returns false, so nothing happens.
8. User tries clicking "remove" again, but still nothing happens. The button has simply stopped working.
8. User is very confused and sends email to developer of web app, complaining that the "remove" button seems to stop working after a while.

As a developer of a web app, I have gotten many such reports from users when I started using the confirm() function. As a result, I'm having to render a modal dialog with HTML instead. Firefox's confusing UI is essentially making the confirm() function unusable for me.

This happens in current Firefox (v46). Chrome is similarly affected, but IE and Safari are unaffected.

As for a solution, I believe that the checkbox has become redundant with recent UI improvements and can simply be removed. Here's why:

I assume that it was originally added to prevent malicious web pages from stealing focus continuously. However, in its current implementation on both Windows and OS X (haven't tested Linux), the confirm() modal dialog does not prevent the user from closing the current tab or window. Additionally, when confirm() is called by a backgrounded window or tab, it does NOT cause the window or tab to acquire focus. This behavior is very sensible, and seems to take care of any focus-stealing concerns. As a result, I believe the checkbox has become redundant and can be removed.

alert() and prompt() show similar checkboxes. They don't create as much of a UX problem as with confirm(), but I think there's no reason not to remove those checkboxes as well.
(Reporter)

Comment 1

2 years ago
Similar issue on Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=613833
Dolske, what do you think? :-)
Component: General → Notifications and Alerts
Flags: needinfo?(dolske)
Product: Firefox → Toolkit
Hmm, yeah, does seem like this could probably be removed. (Or if Gecko cares about apps without tab-modal prompts, adding a pref to allow Firefox to turn off this checkbox.)

Oddly both bug 61098 and bug 59314 landed within a couple months of each other for Firefox 4, but I think we're pretty comfortable at this point that tab-modal prompts will stick. :)
Status: UNCONFIRMED → NEW
Component: Notifications and Alerts → DOM: Core & HTML
Ever confirmed: true
Flags: needinfo?(dolske)
Product: Toolkit → Core

Comment 4

2 days ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 2 days ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.