Skip to content

Commit dfbfea9

Browse files
authored
Allow use of up and down arrow in chat input (#158)
1 parent ff01015 commit dfbfea9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/jupyter-chat/src/components/chat-input.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
128128
}, [input]);
129129

130130
function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
131+
if (['ArrowDown', 'ArrowUp'].includes(event.key) && !open) {
132+
event.stopPropagation();
133+
return;
134+
}
135+
131136
if (event.key !== 'Enter') {
132137
return;
133138
}

0 commit comments

Comments
 (0)