Security warning dialogs should focus button instead of checkbox text



17 years ago
2 years ago


(Reporter: tpowellmoz, Assigned: kaie)


1.0 Branch

Firefox Tracking Flags

(Not tracked)




17 years ago
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
Enter some search terms and press Enter

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

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.

Comment 1

17 years ago
-> 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

Comment 3

17 years ago
Assignee: ssaux → kaie

Comment 4

17 years ago
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

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.

Comment 5

16 years ago
confirmed in build 2002101612  1.2b for linux

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

Related to bug 173246


16 years ago
Keywords: nsbeta1
OS: Windows 2000 → All
Priority: -- → P3
Hardware: PC → All
Version: 2.3 → 2.4

Comment 6

16 years ago
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.

Comment 7

16 years ago
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?

Comment 8

16 years ago
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

Comment 9

14 years ago
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

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.
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 10

14 years ago
I'm sorry, the previous comment was intended for another bug :-(

Resolution: FIXED → ---

Comment 11

14 years ago
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.

Last Resolved: 14 years ago14 years ago
Resolution: --- → WORKSFORME


14 years ago
Component: Security: UI → Security: UI
Product: PSM → Core


11 years ago
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.