#5619 closed bug (fixed)
Autocomplete widget keeps looking for remote data even when it's disabled
Reported by: | ggp | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.8.3 |
Component: | ui.autocomplete | Version: | 1.8.2 |
Keywords: | autocomplete disable disabled remote | Cc: | |
Blocked by: | Blocking: |
Description
I think that autocomplete widget shouldn't send Ajax request to server looking for data when the option 'disabled' is true. I don't know if that's a bug or it's thought to work that way, but I think this isn't correct because server receives load even when you're not interested in its response.
If the source of autocomplete is a remote database with a lot of rows to fetch, this is critical. I want to search data only when clicking a 'search' button, and now it's impossible.
Change History (7)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
an easier fix:
$('#my_input').autocomplete({
search: function(event, ui) {
if($(this).autocomplete('option', 'disabled') == true) {
return false;
}
}
});
comment:3 Changed 13 years ago by
Milestone: | TBD → 1.9 |
---|---|
Priority: | major → critical |
Version: | 1.8.1 → 1.8.2 |
The suggested solution is probably too specific. Autocomplete doesn't care for the disabled option at all, that needs to be fixed.
comment:4 Changed 13 years ago by
Component: | ui.core → ui.autocomplete |
---|
comment:6 Changed 12 years ago by
Milestone: | 1.9 → 1.8.3 |
---|
comment:7 Changed 12 years ago by
Autocomplete: Respect the disabled option. Fixes #5619 - Autocomplete widget keeps looking for remote data even when it's disabled.
Changeset: 90caa93a9b4b9b894b055cfb8dae0661ac7788b0
I propose to replace the current _search method with this:
To use it as a fix in current production environments I propose to use this code: