mirror of
https://github.com/flarum/core.git
synced 2025-07-28 20:20:34 +02:00
Properly inactivate the autocomplete dropdown when there are no suggestions
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user