Fix disabling autocomplete and fix completing special channels

This commit is contained in:
Pavel Djundik 2018-07-08 18:21:15 +03:00 committed by GitHub
parent f249747642
commit ff98f31be2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ module.exports = {
disable() { disable() {
if (enabled) { if (enabled) {
input.off("input.tabcomplete"); input.off("input.tabcomplete");
Mousetrap(input.get(0)).off("tab", "keydown"); Mousetrap(input.get(0)).unbind("tab", "keydown");
textcomplete.destroy(); textcomplete.destroy();
enabled = false; enabled = false;
} }
@ -318,7 +318,7 @@ function completeChans(word) {
.each(function() { .each(function() {
const self = $(this); const self = $(this);
if (!self.hasClass("lobby")) { if (self.hasClass("channel")) {
words.push(self.attr("aria-label")); words.push(self.attr("aria-label"));
} }
}); });