Properly inactivate the autocomplete dropdown when there are no suggestions

This commit is contained in:
Toby Zerner 2017-09-19 19:35:44 +09:30
parent 86496f3e06
commit 53e63069c1

View File

@ -154,14 +154,18 @@ export default function addComposerAutocomplete() {
left = parent.width() - width;
}
dropdown.show(left, top);
} else {
dropdown.active = false;
dropdown.hide();
}
};
dropdown.active = true;
buildSuggestions();
dropdown.setIndex(0);
dropdown.$().scrollTop(0);
dropdown.active = true;
clearTimeout(searchTimeout);
if (typed) {