Make richlistbox send events like a listbox.

RESOLVED FIXED

Status

()

Toolkit
XUL Widgets
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Doron Rosenberg (IBM), Assigned: Doron Rosenberg (IBM))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

13 years ago
 
(Assignee)

Comment 1

13 years ago
Created attachment 188541 [details] [diff] [review]
le patch

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
(Assignee)

Updated

13 years ago
Attachment #188541 - Flags: first-review?(mconnor)
(Assignee)

Updated

13 years ago
Attachment #188541 - Attachment is obsolete: true
Attachment #188541 - Flags: first-review?(mconnor)
(Assignee)

Comment 2

13 years ago
Created attachment 189776 [details] [diff] [review]
new patch

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+
(Assignee)

Comment 4

13 years ago
checked in!
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED

Comment 5

13 years ago
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.