Closed
Bug 68675
Opened 25 years ago
Closed 25 years ago
JavaScript confirm() dialog always returns true if operated with keyboard
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
People
(Reporter: jsp, Assigned: bugzilla)
References
(
URL
)
Details
(Keywords: dataloss)
Attachments
(1 file)
|
990 bytes,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20010208
BuildID: 2001020804
If you use the keyboard (tab and enter keys) rather than a pointer to operate
the JavaScript confirm() dialog, confirm() always returns true, regardless of
whether OK or Cancel is selected.
Reproducible: Always
Steps to Reproduce:
Load the attached test case.
Click the text of the first paragraph to bring up a confirm() dialog.
Use the tab key to select the Cancel button, then press Enter to dismiss the dialog.
Note the return value displayed in the alert() dialog that pops up.
Actual Results: true is returned.
Expected Results: false should be returned (as it is if you use a pointer to
click Cancel).
Also occurs on Macintosh build 2001020208.
Comment 2•25 years ago
|
||
I'm seeing this on linux-2001013010 as well. However, if I tab to the cancel
button and then press "Space" instead of "Enter",
the cancel button ispressed and it returns false as expected. Seems to be just
a problem with the enter key...
Space also behaves the way Enter should on Windows and Macintosh.
Comment 4•25 years ago
|
||
Confirming bug because I see it on 2001021204 WinNT build.
Correct behavior of the buttons for Windows is that space and Enter should
activate the currently selected button. The confirm dialog incorrectly assumes
that Enter always maps to the OK button. Space behaves the way Enter should.
URL: javascript:alert('Confirm returned '+...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•25 years ago
|
||
Added keywords 4xp (doesn't occur with Nav4/IE4+), dataloss because confirm
dialogs are often used before harmful actions in web applications and having
cancel fail to return false could cause problems, and proposed for mozilla0.9
milestone.
Comment 6•25 years ago
|
||
This behavior of Enter not activating the currently selected button seems to
occur throughout Mozilla. I reproduced it with the Edit->Preferences dialog.
Therefore, I'm sure this bug is a duplicate, but can't find one that is general
enough. I'm looking for a bug like "Enter does not activate currently selected
button"
let's accuse blake of knowing.
Assignee: asa → blakeross
Component: Browser-General → XP Apps: GUI Features
QA Contact: doronr → sairuh
Comment 8•25 years ago
|
||
Looks like the best duplicate is bug 67923 (cancel button alert cannot be
accessed via keyboard navigation).
| Assignee | ||
Comment 9•25 years ago
|
||
This is a dup of a bug that deals with enter not triggering the right button.
Matthew, do you know the best bug to dup this against (I found a couple of
candidates)?
Comment 10•25 years ago
|
||
tpowell is correct.
*** This bug has been marked as a duplicate of 67923 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 11•25 years ago
|
||
vrfy dupe of bug 67923 cancel button alert cannot be accessed via keyboard
navigation
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•