Closed Bug 155958 Opened 22 years ago Closed 20 years ago

Security warning dialogs should focus button instead of checkbox text

Categories

(Core Graveyard :: Security: UI, defect, P3)

1.0 Branch
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: tpowellmoz, Assigned: KaiE)

Details

When security warnings appear, they have the first item in the warning dialog
focused. They should focus the default button. This is shown by the dotted focus
ring on the button and not around the checkbox text.
 
To Reproduce:
Enable assorted warnings, Edit->Prefs, Privacy & Security, SSL. For example,
enabled the unencrypted to unencrypted warning. (Aside: It's really confusing
that this warning is on the SSL panel and not forms).
Go to http://www.google.com
Enter some search terms and press Enter

Expected:
The security warning dialog should have focus on the Continue button.

Actual:
The security warning dialog has focus on the checkbox text "Alert me..." This
means that if you press space, the checkbox will be toggled. The odd focus makes
me pause and wonder if Enter will work to complete the dialog.

I believe all dialogs automatically select the first widget. Perhaps they should
only select the first button widget or text input widget. Or perhaps there
should be different behavior depending on the type of warning/alert.

I see this Mozilla 2002070204 on Win2K.
-> security
Assignee: jaggernaut → mstoltz
Component: XP Toolkit/Widgets → Security: General
QA Contact: jrgm → bsharma
Over to PSM - they own the warning dialogs, I think.
Assignee: mstoltz → ssaux
Component: Security: General → Client Library
Product: Browser → PSM
QA Contact: bsharma → junruh
Version: other → 2.3
Kai
Assignee: ssaux → kaie
I agree with the change focus request, it seems reasonable to avoid that user
accidentially turn off important options.

The security code uses nsIPrompt::confirmEx. Jag said, blake or hewitt own that
code.

Blake, Joe: What do you think about this change request? It is suggested, if the
dialog shown by confirmEx only has the message, checkbox and buttons, the
checkbox should not get the focus, but a button should get it.
confirmed in build 2002101612  1.2b for linux

Enter key will not dismiss the dialog like past versions of mozilla.

Related to bug 173246
Keywords: nsbeta1
OS: Windows 2000 → All
Priority: -- → P3
Hardware: PC → All
Version: 2.3 → 2.4
Yes, I noticed in upgrading from Mozilla 1.1 to 1.2 that the enter key will no
longer dismiss dialog boxes like the Security Warning dialog box that will pop
up if you have it enabled when going to a site using ssl.  I haven't seen the
exact behavior of the above bug because Mozilla doesn't focus anything in the
dialog box that pops up.  In fact, I am unable to dismiss the dialog boxes with
anything except my mouse.
i've noticed this too (mozilla 1.2.1, macos x).  return doesn't work, only
clicking will dismiss.  i think even after the dialog is dismissed, focus hasn't
returned to the page.  when i click ok, i must click into a text field on the
page to give it focus.  are these problems a separate bug from the checkbox
having focus or a side effect?
For Mozilla 1.2.1 on Windows 2000, nothing has focus on the Security Warning
dialog and the dialog can only be closed by a mouse click on OK or to close the
window.
This seems fixed to me on Mozilla trunk.

On Linux, using either a GTK1 or GTK2 build, the domain mismatch dialog now
looks slightly differently, probably caused by central changes to the dialog box
behaviour.

When the Cancel button is focused, pressing enter indeed cancels the operation.

WORKSFORME with current trunk.
Please reopen if you still see the problem with nightly builds.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I'm sorry, the previous comment was intended for another bug :-(

Reopening...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
But the funny thing is:

This bug indeed appears fixed, too.

I tried on Linux with a Mozilla 1.7.5 and a current trunk build.
Both set focus to the buttons, pressing space activates the button.

WORKSFORME
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → WORKSFORME
Product: PSM → Core
Version: psm2.4 → 1.0 Branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.