Closed Bug 299947 Opened 19 years ago Closed 19 years ago

Make richlistbox send events like a listbox.

Categories

(Toolkit :: UI Widgets, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: doronr, Assigned: doronr)

Details

Attachments

(1 file, 1 obsolete file)

 
Attached patch le patch (obsolete) — Splinter Review
This patch:
  - makes richlistbox throw a select event when the selected item is changed
  - adds support for suppressOnSelect (like xul:listbox)
  - removes the fireEvent method and checks
  - changes the controller event to richlistbox-select
Attachment #188541 - Flags: first-review?(mconnor)
Attachment #188541 - Attachment is obsolete: true
Attachment #188541 - Flags: first-review?(mconnor)
Attached patch new patchSplinter Review
Same as above, but adds getRowCount and getItemAtIndex
Attachment #189776 - Flags: first-review?(mconnor)
Comment on attachment 189776 [details] [diff] [review]
new patch

>+              while ((children[run] != this.selectedItem) && (run < children.length)) {
>+                run++;
>+              }

nit: extraneous brackets

>+      <method name="_fireOnSelect">
>+        <body>
>+        <![CDATA[

nit: indentation on the CDATA block

>+      <handler event="keypress" keycode="VK_PAGE_UP" action="clearSelection(); goDown(); event.preventDefault();"/>
>+      <handler event="keypress" keycode="VK_PAGE_DOWN" action="clearSelection(); goUp(); event.preventDefault();"/>

this is bogus behaviour, as discussed
Attachment #189776 - Flags: first-review?(mconnor)
Attachment #189776 - Flags: first-review+
Attachment #189776 - Flags: approval1.8b4+
checked in!
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Doron, will it break you if I cache selectedIndex by setting it in a field
whenever selectedItem is set?

Implementing selectedIndex in that way was part of my solution for bug 301435.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: