diff --git a/frontend/src/components/message/PromptInput.command.test.tsx b/frontend/src/components/message/PromptInput.command.test.tsx index 5cd875cb..71e78c42 100644 --- a/frontend/src/components/message/PromptInput.command.test.tsx +++ b/frontend/src/components/message/PromptInput.command.test.tsx @@ -642,6 +642,9 @@ describe('PromptInput command submission', () => { renderComponent() const input = await screen.findByPlaceholderText('Send a message...') + expect(input).toHaveAttribute('autocomplete', 'off') + expect(input).toHaveAttribute('autocorrect', 'on') + expect(input).toHaveAttribute('spellcheck', 'true') fireEvent.focus(input) fireEvent.change(input, { target: { value: 'text' } }) expect(screen.getByRole('button', { name: 'bash !' })).toBeDisabled() @@ -654,6 +657,9 @@ describe('PromptInput command submission', () => { expect(input).toHaveValue('!') expect(screen.getByTestId('composer-mode-badge')).toHaveTextContent('BASH') expect(screen.getByRole('button', { name: 'cmd /' })).toBeDisabled() + expect(input).toHaveAttribute('autocorrect', 'off') + expect(input).toHaveAttribute('autocapitalize', 'off') + expect(input).toHaveAttribute('spellcheck', 'false') fireEvent.click(screen.getByRole('button', { name: 'bash !' })) expect(input).toHaveValue('') diff --git a/frontend/src/components/message/PromptInput.tsx b/frontend/src/components/message/PromptInput.tsx index f0a8d459..0f2af3cb 100644 --- a/frontend/src/components/message/PromptInput.tsx +++ b/frontend/src/components/message/PromptInput.tsx @@ -1280,6 +1280,10 @@ return ( onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop} + autoComplete="off" + autoCorrect={isBashMode ? 'off' : 'on'} + autoCapitalize={isBashMode ? 'off' : 'sentences'} + spellCheck={!isBashMode} placeholder={ isBashMode ? "Enter bash command..."