File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 20
20
color =" primary"
21
21
v-on =" listeners"
22
22
:autofocus =" isDesktopDevice"
23
+ @focusin =" isInputFocused = true"
24
+ @focusout =" isInputFocused = false"
23
25
>
24
26
<template #prepend-inner >
25
27
<chat-emojis
@@ -84,7 +86,8 @@ export default {
84
86
message: ' ' ,
85
87
emojiPickerOpen: false ,
86
88
botCommandIndex: null ,
87
- botCommandSelectionMode: false
89
+ botCommandSelectionMode: false ,
90
+ isInputFocused: false
88
91
}),
89
92
computed: {
90
93
isDesktopDevice : () => ! isMobile (),
@@ -157,7 +160,7 @@ export default {
157
160
onKeyCommand : function (event ) {
158
161
if (event .ctrlKey && event .shiftKey && event .code === ' Digit1' ) {
159
162
this .openElement ()
160
- } else if (event .code === ' ArrowUp' || event .code === ' ArrowDown' ) {
163
+ } else if (this . isInputFocused && ( event .code === ' ArrowUp' || event .code === ' ArrowDown' ) ) {
161
164
this .selectCommand (event .code )
162
165
event .preventDefault ()
163
166
} else if (event .key .length === 1 ) {
You can’t perform that action at this time.
0 commit comments