Skip to content

Commit 0e3e793

Browse files
committed
Make autocomplete work with keyboard navigation
1 parent dff3c50 commit 0e3e793

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ codeInput.plugins.Autocomplete = class extends codeInput.Plugin {
4444
}
4545

4646
let textarea = codeInput.textareaElement;
47-
textarea.addEventListener("input", () => { this.updatePopup(codeInput, false)});
48-
textarea.addEventListener("click", () => { this.updatePopup(codeInput, false)});
47+
codeInput.addEventListener("keypress", () => { this.updatePopup(codeInput, false)});
48+
codeInput.addEventListener("click", () => { this.updatePopup(codeInput, false)});
4949
}
5050
/**
5151
* Return the coordinates of the caret in a code-input

0 commit comments

Comments
 (0)