Search and Top Navigation
#6673 closed bug (fixed)
Opened November 19, 2010 08:14PM UTC
Closed November 19, 2010 09:29PM UTC
Last modified December 08, 2010 06:38PM UTC
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:
1. 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).
2. The other part is the same as in the page
http://jqueryui.com/demos/autocomplete/#combobox
3. Open IE, type "T" in the textbox, the autocomplete will display, select "Tom" by click on it. The textbox will display "Tom".
4. Move focus to some other place so textbox lost focus.
The textbox will become blank! and the underline dropdown item 7 was not selected.
5. 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
Attachments (0)
Change History (3)
Changed November 19, 2010 08:23PM UTC by comment:1
component: | [meta] ui.demos → ui.autocomplete |
---|
Changed November 19, 2010 09:29PM UTC by comment:2
resolution: | → fixed |
---|---|
status: | new → closed |
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.
Changeset: ddf59462af7fb986bb06c0b6d0101086b0702f5b
Changed December 08, 2010 06:38PM UTC by comment:3
milestone: | 1.9 → 1.8.7 |
---|