Skip to content

Commit 99dd343

Browse files
committed
Handle arrow key navigation to hide ghost text in prompt field
1 parent 5caad3f commit 99dd343

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/ui/src/components/editor/panel/PromptField/PromptField.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,12 @@ export const PromptField: React.FC<PromptFieldProps> = (props) => {
375375
handle_input_change(e)
376376
}}
377377
onKeyDown={(e) => {
378-
if (e.key == 'ArrowRight') {
378+
if (
379+
e.key == 'ArrowRight' ||
380+
e.key == 'ArrowLeft' ||
381+
e.key == 'ArrowUp' ||
382+
e.key == 'ArrowDown'
383+
) {
379384
set_should_show_ghost_text(false)
380385
const ghost_text_node = input_ref.current?.querySelector(
381386
'span[data-type="ghost-text"]'

0 commit comments

Comments
 (0)