mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix(frontend): turn off autocorrect, capitalization and spellcheck in the composer
Prompts often mention file names, commands and identifiers, which browser text assistance rewrites. Disable autocorrect, auto-capitalization and spellcheck in every composer mode, not only bash mode.
This commit is contained in:
1 parent
a1c2546219
commit
bb196cb118
2 files changed
+6
-5
No files matched your search
@@ -643,8 +643,9 @@ describe('PromptInput command submission', () => {
|
||||
|
||||
const input = await screen.findByPlaceholderText('Send a message...')
|
||||
expect(input).toHaveAttribute('autocomplete', 'off')
|
||||
expect(input).toHaveAttribute('autocorrect', 'on')
|
||||
expect(input).toHaveAttribute('spellcheck', 'true')
|
||||
expect(input).toHaveAttribute('autocorrect', 'off')
|
||||
expect(input).toHaveAttribute('autocapitalize', 'off')
|
||||
expect(input).toHaveAttribute('spellcheck', 'false')
|
||||
fireEvent.focus(input)
|
||||
fireEvent.change(input, { target: { value: 'text' } })
|
||||
expect(screen.getByRole('button', { name: 'bash !' })).toBeDisabled()
|
||||
|
||||
@@ -1281,9 +1281,9 @@ return (
|
||||
onDragLeave={handleDragLeave}
|
||||
onDrop={handleDrop}
|
||||
autoComplete="off"
|
||||
autoCorrect={isBashMode ? 'off' : 'on'}
|
||||
autoCapitalize={isBashMode ? 'off' : 'sentences'}
|
||||
spellCheck={!isBashMode}
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
spellCheck={false}
|
||||
placeholder={
|
||||
isBashMode
|
||||
? "Enter bash command..."
|
||||
|
||||
Reference in new issue
Block a user