Skip to content

Commit 63dcc89

Browse files
Fix: Enable up and down arrow keys in chat input (#1254)
Co-authored-by: Venkata Sai Keerthi Swarna <vskirthi@amazon.com>
1 parent e67b5eb commit 63dcc89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ export function ChatInput(props: ChatInputProps): JSX.Element {
235235

236236
const inputExists = !!input.trim();
237237
function handleKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {
238+
if (['ArrowDown', 'ArrowUp'].includes(event.key) && !open) {
239+
event.stopPropagation();
240+
return;
241+
}
242+
238243
if (event.key !== 'Enter') {
239244
return;
240245
}

0 commit comments

Comments
 (0)