If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

window.confirm() should ask yes-or-no, not OK-or-cancel

RESOLVED EXPIRED

Status

()

Core
DOM: Core & HTML
RESOLVED EXPIRED
13 years ago
12 years ago

People

(Reporter: Brian Lalonde, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

The confirmation dialog used in JavaScript is meant to ask yes-or-no questions,
but Internet Explorer has always provided only OK and Cancel buttons. This can
be very confusing for users, since Cancel  seems to ask if the question itself
should be skipped (rather than answering). For example: Are you a member? OK
implies something less than positive certainty, but Cancel implies a kind of
"nevermind" response rather than "no".

Reproducible: Always

Steps to Reproduce:
1. Use window.confirm()
(Reporter)

Comment 1

13 years ago
> but Internet Explorer has always provided only OK and Cancel buttons. 

And current Mozillas.

Comment 2

13 years ago
See, you already got the problem :). IE has been like that for many years and so
has Mozilla/Firefox/etc.. Many pages probably rely on those Ok/Cancel buttons in
their wordings, so changing it now wouldn't be too clever (and annoy many
webmasters).
(Reporter)

Comment 3

13 years ago
Maybe additional args for button labels (first as default)?
  if(window.confirm('Continue?','Yes','No')) // ...

Or perhaps a new function?
  if( (window.affirm && window.affirm('Continue?'))
    || window.confirm('Continue?\n[OK] for yes\n[Cancel] for no')) // ...
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.