Skip to content

Commit

Permalink
Fix keyboard entry and error
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonReed-2 committed Oct 8, 2023
1 parent 8da5b91 commit 017d9b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/renderer/components/battle/BattleChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function sendMessage() {
// If an autosuggestion is currently keyboard selected: pressing enter should autocomplete the suggestion
if (autoSuggestionSelection.value != null) {
myMessage.value = autoSuggestionSelection.value;
return;
}
api.comms.request("c.lobby.message", {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/controls/AutoSuggest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function clickOption(option: AutoSuggestionOption) {
}
function changeKeyboardSelection(direction: 1 | -1) {
if (filteredOptions.value == null) {
if (filteredOptions.value == null || filteredOptions.value.length === 0) {
updateKeyboardSelectionIndex(null);
return;
}
Expand Down

0 comments on commit 017d9b5

Please sign in to comment.