Fix autocompletion menu not closing on send
This commit is contained in:
parent
6877199515
commit
1d4ab8fff1
@ -16,6 +16,7 @@ module.exports = {
|
||||
enable: enableAutocomplete,
|
||||
disable() {
|
||||
if (enabled) {
|
||||
$("#form").off("submit.tabcomplete");
|
||||
input.off("input.tabcomplete");
|
||||
Mousetrap(input.get(0)).unbind("tab", "keydown");
|
||||
textcomplete.destroy();
|
||||
@ -24,12 +25,6 @@ module.exports = {
|
||||
},
|
||||
};
|
||||
|
||||
$("#form").on("submit", () => {
|
||||
if (enabled) {
|
||||
textcomplete.hide();
|
||||
}
|
||||
});
|
||||
|
||||
const emojiSearchTerms = Object.keys(emojiMap);
|
||||
const emojiStrategy = {
|
||||
id: "emoji",
|
||||
@ -263,6 +258,10 @@ function enableAutocomplete(inputRef) {
|
||||
textcomplete.on("hidden", () => {
|
||||
autocompleting = false;
|
||||
});
|
||||
|
||||
$("#form").on("submit.tabcomplete", () => {
|
||||
textcomplete.hide();
|
||||
});
|
||||
}
|
||||
|
||||
function fuzzyGrep(term, array) {
|
||||
|
Loading…
Reference in New Issue
Block a user