Closed Bug 301435 Opened 19 years ago Closed 8 years ago

Rich list box focus gets lost when focused item removed from list

Categories

(Toolkit :: UI Widgets, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: aaronlev, Assigned: doronr)

Details

(Keywords: access)

Attachments

(1 file, 2 obsolete files)

1. Go to download manager
2. Arrow down to one of the items
3. Tab to "remove"
4. Hit enter

Focus goes away in the list. You can tab to other things, but not back into the
list.

This means that kbd users cannot really clean up their list of downloads.
Component: Disability Access → XUL Widgets
Product: Firefox → Toolkit
QA Contact: disability.access → xul.widgets
robert: I believe you said you had a patch to fix this?
This also fixes bug 300780 -- initial focus in download/extension/theme manager
Assignee: doronr → aaronleventhal
Status: NEW → ASSIGNED
Attachment #189927 - Flags: first-review?(mconnor)
Attachment #189927 - Flags: first-review?(mconnor)
Attached patch Merge with trunk (obsolete) — Splinter Review
Another thing that would be nice would be to show focus on the #saveToFolder
button at the bottom. Right now when you tab to it, focus disappears. I tried
adding a style rule for :focus to that or toolbarbutton in general, but most of
my style rules wouldn't take for some reason, even with !important.
Attachment #189927 - Attachment is obsolete: true
Attachment #189998 - Flags: first-review?(mconnor)
Comment on attachment 189998 [details] [diff] [review]
Merge with trunk

We should be checking if we are selected on destruction and if so, clear
selection.
Attachment #189998 - Attachment is obsolete: true
Attachment #189998 - Flags: first-review?(mconnor)
Assignee: aaronleventhal → doronr
Status: ASSIGNED → NEW
Attached patch patchSplinter Review
This patches download manager to set focus back and all, since doing it from
inside richlistbox was really hacky (checking if selection broke each time
somethign was added just sounds wrong).  Sadley there is no way to be notified
when the template gets rebuilt.
Attachment #190062 - Flags: first-review?(mconnor)
(In reply to comment #5)
> This patches download manager to set focus back and all, since doing it from
> inside richlistbox was really hacky (checking if selection broke each time
> somethign was added just sounds wrong).  

Yes but that fixed the base widget. We should always fix the base widget because
people will use richlistbox for other things. We can't always be around to fix
this kind of bug in each use of richlist box in extensions and with xulrunner.
(In reply to comment #6)
> (In reply to comment #5)
> > This patches download manager to set focus back and all, since doing it from
> > inside richlistbox was really hacky (checking if selection broke each time
> > somethign was added just sounds wrong).  
> 
> Yes but that fixed the base widget. We should always fix the base widget because
> people will use richlistbox for other things. We can't always be around to fix
> this kind of bug in each use of richlist box in extensions and with xulrunner.

I'd rather fix it in the users for now and research a better way.  I'll talk to
the rdf people about a way to listen to rebuilds of templates. mconnor probably
needs to decide if the constructor thing is something we want to take
Doron, we would still need the <constructor> for the part that fixed bug 300780.

      <constructor>
+        <![CDATA[
+          var listBox = this.control;
+          if (!listBox.selectedItem)
+            listBox.goDown();  // Fix up initial focus as items are created

I guess I'll put that in a separate patch for that bug.
Comment on attachment 190062 [details] [diff] [review]
patch

r+a=me with the bogus blank line removed.
Attachment #190062 - Flags: first-review?(mconnor)
Attachment #190062 - Flags: first-review+
Attachment #190062 - Flags: approval1.8b4+
Checked in for Doron.

Checking in toolkit/content/widgets/richlistbox.xml;
/cvsroot/mozilla/toolkit/content/widgets/richlistbox.xml,v  <--  richlistbox.xml
new revision: 1.11; previous revision: 1.10
done
Checking in toolkit/mozapps/downloads/content/downloads.js;
/cvsroot/mozilla/toolkit/mozapps/downloads/content/downloads.js,v  <--  downloads.js
new revision: 1.47; previous revision: 1.46
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Actually I'm going to reopen this so that at some point we can get a general fix
for richlistbox, instead of a workaround in the users of <richlistbox>.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 19 years ago8 years ago
Resolution: --- → INVALID
Keywords: sec508
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: