xul:toolbarbutton with style="-moz-user-focus:normal" is not focusable on mac

RESOLVED WORKSFORME

Status

()

Firefox
Keyboard Navigation
RESOLVED WORKSFORME
7 years ago
7 years ago

People

(Reporter: Ilya Kharlamov, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

256 bytes, application/vnd.mozilla.xul+xml
Details
(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
Build Identifier: Mozilla/5.0 (Macintosh, U; Intel Mac OS X 10.4; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

XUL only MAC only problem

Reproducible: Always

Steps to Reproduce:
1. Create the following xul file, save it as xul.xul:
"<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbarbutton label="AAA" style="-moz-user-focus:normal;"/>
</window>"
2.Open it in Firefox 3.6.10/Mac
3. Click on the toolbarbutton with "AAA" label
Actual Results:  
The toolbarbutton is not focusable

Expected Results:  
According to https://developer.mozilla.org/en/XUL_Tutorial/Focus_and_Selection
toolbarbutton with css style="-moz-user-focus:normal;" must be focusable.
(Reporter)

Comment 1

7 years ago
Created attachment 482582 [details]
the xul file has been attached
This works for me with FF 3.6.10 as well as the latest FF4 beta nightly.

Try adding a handler to your tb button to confirm:
e.g. onfocus="alert('foo');" 

Note OSX has a "full keyboard access" setting that you might not have enabled. Please see http://support.apple.com/kb/HT2840 for details.

Also note, that there doesn't seem to be a visual indicator that the toolbarbutton is focused. Perhaps you could add a style for that.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

7 years ago
thanks.
In order to mac work the same way as on PC the css should be like the following:
toolbarbutton:focus {
    -moz-user-focus:normal;
    -moz-appearance:toolbarbutton;
    outline:1px dotted -moz-dialogtext;
    outline-offset:-2px;
}
OS: Mac OS X → Windows 7
You need to log in before you can comment on or make changes to this bug.