#6673 closed bug (fixed)
Autocomplete combobox is not working in IE if value and name is different
Reported by: | guoicq | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.7 |
Component: | ui.autocomplete | Version: | 1.8.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The combobox is not working in IE8 if the value is different with the name displayed in the dropdown.
How to re-produce:
- Use the following dropdown below:
<select id="user">
<option value="">--</option> <option value="1">Eric</option> <option value="7">Tom</option>
</select>
The value (user id) above is different with the name (user name).
- The other part is the same as in the page
http://jqueryui.com/demos/autocomplete/#combobox
- Open IE, type "T" in the textbox, the autocomplete will display, select "Tom" by click on it. The textbox will display "Tom".
- Move focus to some other place so textbox lost focus.
The textbox will become blank! and the underline dropdown item 7 was not selected.
- The bug can be fixed by change the matching
if ( this.value.match( matcher ) ) { to if ( this.innerHTML.match( matcher ) ) {
Check out here: https://github.com/guoicq/jquery-ui/commit/ba9fee04c9aacef0dbb888693c79b035bbb3f3b5
Thanks
Charles
Change History (3)
comment:1 Changed 12 years ago by
Component: | [meta] ui.demos → ui.autocomplete |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 12 years ago by
Milestone: | 1.9 → 1.8.7 |
---|
Note: See
TracTickets for help on using
tickets.
Autocomplete: Use the text of the option, not the value when checking for valid values. Fixes #6673 - Autocomplete combobox is not working in IE if value and name is different.