diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 0b91c32a..223c9add 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -2279,6 +2279,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo if (showCommandAutocomplete && commandRef.current) { if (e.key === 'Enter' || e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'Escape' || e.key === 'Tab') { e.preventDefault(); + e.stopPropagation(); commandRef.current.handleKeyDown(e.key); return; } @@ -2287,6 +2288,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo if (showSkillAutocomplete && skillRef.current) { if (e.key === 'Enter' || e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'Escape' || e.key === 'Tab') { e.preventDefault(); + e.stopPropagation(); skillRef.current.handleKeyDown(e.key); return; } @@ -2295,6 +2297,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo if (showSnippetAutocomplete && snippetRef.current) { if (e.key === 'Enter' || e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'Escape' || e.key === 'Tab') { e.preventDefault(); + e.stopPropagation(); snippetRef.current.handleKeyDown(e.key); return; } @@ -2303,6 +2306,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo if (showFileMention && mentionRef.current) { if (e.key === 'Enter' || e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'Escape' || e.key === 'Tab') { e.preventDefault(); + e.stopPropagation(); mentionRef.current.handleKeyDown(e.key); return; }