fix blank check

This commit is contained in:
LenAnderson 2024-04-25 20:40:23 -04:00
parent 71b180ea2f
commit 2b9b72e98a
1 changed files with 2 additions and 2 deletions

View File

@ -620,7 +620,7 @@ export class SlashCommandAutoComplete {
}
case 'Enter': {
// pick the selected item to autocomplete
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.type == OPTION_TYPE.BLANK) break;
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
if (this.selectedItem.name == this.name) break;
evt.preventDefault();
evt.stopImmediatePropagation();
@ -629,7 +629,7 @@ export class SlashCommandAutoComplete {
}
case 'Tab': {
// pick the selected item to autocomplete
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.type == OPTION_TYPE.BLANK) break;
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
evt.preventDefault();
evt.stopImmediatePropagation();
this.select();