In Firefox, when you click a disabled button when some other element
is focused, the element loses focus. Does the disabled button get
focus? If not, what has focus when you click a disabled button/
element?
Thanks in advance.
>In Firefox, when you click a disabled button when some other element is focused, the element loses focus.
>
That's not supposed to happen. Do you have a test case?
--
Warning: May contain traces of nuts.
I'd better look again and double-check. I'll let you know what I find
out.
> That's not supposed to happen. Do you have a test case?
Here's what does it for me.
1. On the Options window "Main" panel, set up the checkboxes under the
Downloads groupbox like this:
Show the Downloads window when downloading a file -- checked
Close it when all downloads are finished -- checked
2. Now uncheck "Show the Downloads window" so that "Close it when all
downloads are finished" becomes disabled.
3. Tab to the Cancel button so it has focus.
4. Click on the now-disabled "Show the Downloads window"
5. Cancel button loses focus
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1.1) Gecko/20061204
Firefox/2.0.0.1
Using default theme.
I said "when you click a disabled button" but my posted example is
based on clicking a disabled checkbox. Still, if you go to the
Options Security pane and click the the disabled Add-ons
"Exceptions ..." button you'll see the same thing.
Also, when I say "loses focus" I'm talking about a change of
appearance from the perspective of the end user. I don't know what
change of DOM state this represents.
HTH.
>On Feb 14, 10:20 am, Neil wrote:
>
>>That's not supposed to happen. Do you have a test case?
>>
>>
>Here's what does it for me.
>
>
This is an extension development group, not a browser support group.
When I asked for a test case, I thought perhaps you had written a dialog
and you were having focus issues, and I wanted to see your XUL in case
it was relevant.
I'd call Firefox a relevant test case since it uses XUL, and it's
readily available. Any extension with a disabled checkbox will have the
same problem. Example XUL:
<checkbox label="Enabled checkbox" checked="false"/>
<checkbox label="Disabled checkbox" checked="false" disabled="true"/>
Put focus on the first of these checkboxes. Click around the empty
areas of the window/dialog and focus will remain. Then click on the
disabled checkbox and focus leaves the first checkbox.
Focus does not transfer to the disabled checkbox - or at least an
onfocus event on it will not fire. I don't have the javascript handy
for determining the current focused element.
In any case, it's a browser bug, and I don't see an easy work-around for
extension authors, but I haven't given it much thought yet.
Tom
> click on the disabled checkbox and focus leaves the first checkbox.
You're absolutely right. The reason I was so surprised was that I
normally use an old version which doesn't have this bug.
I've no idea what the cause of the bug is but I'm sure it needs to be
logged in Bugzilla if it isn't already.
By the way, when elements blur like that the focus goes to the enclosing
frame.
Added to Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=375008
. You might want to review it if you get a moment, since I don't know
for certain what the correct UI behavior should be; all I know is it
seemed wrong.
> By the way, when elements blur like that the focus goes to the enclosing
> frame.
Thanks for the info!