Closed
Bug 386482
Opened 17 years ago
Closed 17 years ago
Add a setter for richlistitem.searchLabel
Categories
(Toolkit :: UI Widgets, defect)
Toolkit
UI Widgets
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: zeniko, Assigned: zeniko)
References
Details
Attachments
(1 file)
1.54 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
(to conform to expectations due to similar properties and to the foresightful documentation)
Assignee | ||
Comment 1•17 years ago
|
||
Not sure whether a way to revert to the default value is really needed, but |item.searchLabel = null| seems nicer than |item.removeAttribute("searchlabel")| and more in line with |item.searchLabel = "find me"| and |item.searchLabel = ""|.
Comment 2•17 years ago
|
||
Comment on attachment 270478 [details] [diff] [review] fix >+ if (val !== null) >+ this.setAttribute("searchlabel", val); Just use if (val)
Attachment #270478 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 3•17 years ago
|
||
Due to the the way the getter works, there are three different cases: item.searchLabel = "text" // FAYT tries to match "text" item.searchLabel = "" // FAYT never selects this item item.searchLabel = null // FAYT tries to match item.label Using |if (val)| instead of |if (val !== null)| would prevent the second case, i.e. excluding an item from FAYT by giving it an empty searchlabel. Should you not want to allow the second case, the getter would have to be rewritten to |return this.getAttribute("searchlabel") || this.label;|.
Whiteboard: [checkin needed]
Comment 4•17 years ago
|
||
Checking in toolkit/content/widgets/richlistbox.xml; new revision: 1.40; previous revision: 1.39
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [checkin needed]
You need to log in
before you can comment on or make changes to this bug.
Description
•