From a6443f71a3bcbc61e520f1ec427460e34c8fc3de Mon Sep 17 00:00:00 2001 From: LenAnderson Date: Fri, 26 Jul 2024 22:20:34 -0400 Subject: [PATCH] constructor should also allow HTMLInputElement --- public/scripts/autocomplete/AutoComplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/autocomplete/AutoComplete.js b/public/scripts/autocomplete/AutoComplete.js index 0e8d4cc7a..d09db7091 100644 --- a/public/scripts/autocomplete/AutoComplete.js +++ b/public/scripts/autocomplete/AutoComplete.js @@ -77,7 +77,7 @@ export class AutoComplete { /** - * @param {HTMLTextAreaElement} textarea The textarea to receive autocomplete. + * @param {HTMLTextAreaElement|HTMLInputElement} textarea The textarea to receive autocomplete. * @param {() => boolean} checkIfActivate Function should return true only if under the current conditions, autocomplete should display (e.g., for slash commands: autoComplete.text[0] == '/') * @param {(text: string, index: number) => Promise} getNameAt Function should return (unfiltered, matching against input is done in AutoComplete) information about name options at index in text. * @param {boolean} isFloating Whether autocomplete should float at the keyboard cursor.