#6221 closed bug (fixed)
Autocomplete: Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case
Reported by: | reidres | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | 1.8.6 |
Component: | ui.autocomplete | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Observed using IE 8. Setting: minLength: 2
I am using a single textbox / autocomplete to create a list. The list is handled outside of the textbox autocomplete functionality, except that I have autocomplete's Select functionality send it outside of textbox and autocomplete.
I am returning false from the Select function. And within the Select function I am clearing the textbox (setting to "").
Imagine I want to select John Smith the first time and John Doe the second time. I type in "jo" and the source function is triggered. I then select John Smith. It goes fine. The Select function is triggered and clears the textbox. Then I again type in "jo" with a fast typing speed. In this case the source function is not triggered. If instead I type in "jo" with a slow typing speed, the source function is triggered. If I instead type in "su" or any other two letters at a fast or slow speed, the source function is triggered.
I am working around this by putting my initializing source and Select functions in a reset function and in my Select function I am using the AutoComplete destroy method and then calling my reset function.
Maybe this is not a bug but I am submitting it in case it is.
Change History (5)
comment:1 follow-up: 2 Changed 12 years ago by
comment:2 Changed 12 years ago by
OK, I will state that the issue concerns the UI and not the plugin version, though the plugin has a similar issue apparently. And the UI demo does not have the issue that I show in steps 1-5 above. Nonetheless, the 1.8.5 UI autocomplete does have the issue I state in the original posting.
comment:3 Changed 12 years ago by
Milestone: | TBD → 1.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case → Autocomplete: Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case |
Fixed in 5c67ed2.
comment:4 Changed 12 years ago by
Milestone: | 1.9 → 1.8.6 |
---|
comment:5 Changed 12 years ago by
Autocomplete: Always reset this.term after a select event, even if the select is cancelled. Fixes #6221 - Autocomplete: Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case.
Changeset: 5c67ed26e8c36c42c9f149fcfb2f5fe9e1192b26
I see I can duplicate a similar issue the demo: http://docs.jquery.com/Plugins/autocomplete.
(1) type in a lowercase c; results pop up (2) click right next to that textbox where it says "API" (3) return to the textbox and select the c (4) press the delete key on your keyboard (5) re-enter a c; nothing pops up