Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

buttons and focus

9 views
Skip to first unread message

mcdav...@netscape.net

unread,
Feb 14, 2007, 1:53:29 AM2/14/07
to
Hi all,

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.

Neil

unread,
Feb 14, 2007, 11:20:50 AM2/14/07
to
mcdav...@netscape.net wrote:

>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.

mcdav...@netscape.net

unread,
Feb 14, 2007, 3:49:58 PM2/14/07
to

I'd better look again and double-check. I'll let you know what I find
out.

mcdav...@netscape.net

unread,
Feb 14, 2007, 4:06:06 PM2/14/07
to
On Feb 14, 10:20 am, Neil <n...@parkwaycc.co.uk> wrote:

> 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.

mcdav...@netscape.net

unread,
Feb 14, 2007, 6:28:00 PM2/14/07
to
On Feb 14, 10:20 am, Neil <n...@parkwaycc.co.uk> wrote:
> mcdavis...@netscape.net wrote:
> >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?

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.

Neil

unread,
Feb 15, 2007, 4:25:38 AM2/15/07
to
mcdav...@netscape.net wrote:

>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.

Tom Brunet

unread,
Mar 22, 2007, 11:00:15 AM3/22/07
to
> 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

Neil

unread,
Mar 22, 2007, 8:14:48 PM3/22/07
to
Tom Brunet wrote:

> 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.

mcdav...@netscape.net

unread,
Mar 22, 2007, 11:38:28 PM3/22/07
to
On Mar 22, 6:14 pm, Neil <n...@parkwaycc.co.uk> wrote:
> 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.

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!

0 new messages