Opened 9 years ago
Closed 9 years ago
#9740 closed bug (duplicate)
Autocomplete doesn't keep its internal state consistent with jQuery val calls
Reported by: | emmerich | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.autocomplete | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Manipulating the contents of an input element with an autocomplete field attached using jQuery.val does not update the autocomplete's internal "term" variable.
JSFiddle here: http://jsfiddle.net/qbwdm/
Reproduction steps:
- Type "Hello" into the input box
- Wait for the drop-down
- Press enter
- Value is cleared, drop-down disappears
- Select the input box
- Type "Hello" again (fairly quickly)
Expected:
- Drop-down appears with the correct options
Actual:
- Drop-down doesn't appear
It's because the check in the _searchTimeout (if(this.term !== this._value()) fails, as the internal value was not updated when the .val("") call was made.
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.
Apologies, the ticket seems to has lost some of my formatting around the repro steps.