mirror of
https://github.com/thelounge/thelounge
synced 2024-11-16 00:58:04 +00:00
Passthrough input ref
This commit is contained in:
parent
2e3b95b9ed
commit
f9d255b678
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
if (this.$root.settings.autocomplete) {
|
||||
require("../js/autocompletion").enable();
|
||||
require("../js/autocompletion").enable(this.$refs.input);
|
||||
}
|
||||
|
||||
const inputTrap = Mousetrap(this.$refs.input);
|
||||
|
|
|
@ -172,12 +172,12 @@ const backgroundColorStrategy = {
|
|||
index: 2,
|
||||
};
|
||||
|
||||
function enableAutocomplete() {
|
||||
function enableAutocomplete(inputRef) {
|
||||
enabled = true;
|
||||
let tabCount = 0;
|
||||
let lastMatch = "";
|
||||
let currentMatches = [];
|
||||
input = $("#input");
|
||||
input = $(inputRef);
|
||||
|
||||
input.on("input.tabcomplete", () => {
|
||||
tabCount = 0;
|
||||
|
|
Loading…
Reference in a new issue