mirror of
https://github.com/flarum/framework.git
synced 2025-02-12 20:10:45 +08:00
Properly inactivate the autocomplete dropdown when there are no suggestions
This commit is contained in:
parent
86496f3e06
commit
53e63069c1
|
@ -154,14 +154,18 @@ export default function addComposerAutocomplete() {
|
||||||
left = parent.width() - width;
|
left = parent.width() - width;
|
||||||
}
|
}
|
||||||
dropdown.show(left, top);
|
dropdown.show(left, top);
|
||||||
|
} else {
|
||||||
|
dropdown.active = false;
|
||||||
|
dropdown.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dropdown.active = true;
|
||||||
|
|
||||||
buildSuggestions();
|
buildSuggestions();
|
||||||
|
|
||||||
dropdown.setIndex(0);
|
dropdown.setIndex(0);
|
||||||
dropdown.$().scrollTop(0);
|
dropdown.$().scrollTop(0);
|
||||||
dropdown.active = true;
|
|
||||||
|
|
||||||
clearTimeout(searchTimeout);
|
clearTimeout(searchTimeout);
|
||||||
if (typed) {
|
if (typed) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user