Autocomplete results not reset after clearing search field
Explain for the defect¶
There are several autocomplete UI's for searching a specific field in redmine;
for example, searching for user (in a modal dialog when adding issue watchers) and for user or group (in the member tab of project settings).
The search result at first show the list of all possible values (to be added),
and when user types a query to search for user (or group), with a delay of 300ms, the search result list shows up with checkboxes.
However, if the search query becomes an empty string,
no ajax request is fired and therefore the list remains to show values the search result for the preivous query, which seems to be quite unnatural.
Is this behavior intended, or is a bug ? For older versions of redmine (e.g. 1.1.x), the search works as I expected.
I think, when query becomes empty, showing up the list identical to the initial list (when query was empty) would be more natural behavior.
That is, the ajax request should be fired even if the query is empty.
About the implementation¶
What if it is removed?
Moreover, as far as I know, recent versions (such as 1.4.x and 2.0.x) are affected as well.
Shortly, I will find out patches for the older versions that has another implementation of field observation.
Thank you very much!