#6461 closed enhancement (fixed)
ComboBox: Highlight the search string in items in the drop down
Reported by: | wolfram | Owned by: | wolfram |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit - Form | Version: | 1.1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Change History (14)
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
Milestone: | → 1.2 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Summary: | Highlight the search string in the drop down of a ComboBox → ComboBox: Highlight the search string in items in the drop down |
Unfortunately this isn't going to work if search string and/or returned results have special characters in them.
So for example, if the user types in "lt>" and it matches an item called "lt><<", make sure the highlighting works correctly in that case.
comment:3 Changed 13 years ago by
Milestone: | 1.2 → 1.3 |
---|
comment:4 Changed 13 years ago by
Owner: | set to wolfram |
---|---|
Status: | reopened → new |
Wolfram is working on this so assigning to him. I think the code checked in in [13288] just needs to be changed to first convert both the search string and the item from plain text to HTML; 0.4 had a function for this but unfortunately was removed in 0.9. However, there is code in InlineEditBox and/or TextArea to do the same thing:
value = value.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, """) .replace(/\n/g, "<br>");
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 Changed 13 years ago by
comment:9 Changed 13 years ago by
comment:10 Changed 13 years ago by
Milestone: | 1.3 → 1.2 |
---|
comment:11 Changed 13 years ago by
Comments in ComboBox?.js indicate that doHighlight() should be overridden for custom highlighting, but _lastInput is not passed to this method. User must access the private variable _lastInput to override. Ideally, I think, pass in "this._escapeHTML(this._lastInput)" as second parameter to doHighlight(), giving user everything he needs to cleanly override. Many thanks!
comment:14 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Fixed by [13288]