From 6fdeb833b25fd5987022f1570c9aa6b6404d0e89 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Fri, 9 Jan 2026 11:13:52 +0200 Subject: [PATCH] feat: disable spell check and autocomplete for input, number input, and textarea components --- packages/ui/src/components/chat/ChatInput.tsx | 2 +- packages/ui/src/components/ui/input.tsx | 4 ++++ packages/ui/src/components/ui/number-input.tsx | 4 ++++ packages/ui/src/components/ui/textarea.tsx | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 3630e0cb..63f21470 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -605,7 +605,7 @@ export const ChatInput: React.FC = ({ onOpenSettings, scrollToBo } } - if (e.key === 'Tab' && e.shiftKey && !showCommandAutocomplete && !showAgentAutocomplete && !showFileMention) { + if (e.key === 'Tab' && !showCommandAutocomplete && !showAgentAutocomplete && !showFileMention) { e.preventDefault(); cycleAgent(); return; diff --git a/packages/ui/src/components/ui/input.tsx b/packages/ui/src/components/ui/input.tsx index e674e468..ec35140e 100644 --- a/packages/ui/src/components/ui/input.tsx +++ b/packages/ui/src/components/ui/input.tsx @@ -13,6 +13,10 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) { "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className )} + spellCheck={false} + autoComplete="off" + autoCorrect="off" + autoCapitalize="off" {...props} /> ) diff --git a/packages/ui/src/components/ui/number-input.tsx b/packages/ui/src/components/ui/number-input.tsx index aad0498f..a2e00779 100644 --- a/packages/ui/src/components/ui/number-input.tsx +++ b/packages/ui/src/components/ui/number-input.tsx @@ -144,6 +144,10 @@ const NumberInput = React.forwardRef( onBlur={handleBlur} onKeyDown={handleKeyDownInternal} disabled={disabled} + spellCheck={false} + autoComplete="off" + autoCorrect="off" + autoCapitalize="off" className={cn( "h-full w-14 bg-transparent px-1.5 text-center typography-ui-label text-foreground", "placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground", diff --git a/packages/ui/src/components/ui/textarea.tsx b/packages/ui/src/components/ui/textarea.tsx index e59cf7c8..3207c7d1 100644 --- a/packages/ui/src/components/ui/textarea.tsx +++ b/packages/ui/src/components/ui/textarea.tsx @@ -16,6 +16,10 @@ const Textarea = React.forwardRef )