diff --git a/ts/components/Input.stories.tsx b/ts/components/Input.stories.tsx index 8fe19a1d9c..ab15b630f3 100644 --- a/ts/components/Input.stories.tsx +++ b/ts/components/Input.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2021 Signal Messenger, LLC +// Copyright 2021-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useState } from 'react'; @@ -18,6 +18,7 @@ const stories = storiesOf('Components/Input', module); const createProps = (overrideProps: Partial = {}): PropsType => ({ disabled: Boolean(overrideProps.disabled), + disableSpellcheck: overrideProps.disableSpellcheck, expandable: Boolean(overrideProps.expandable), hasClearButton: Boolean(overrideProps.hasClearButton), i18n, @@ -92,3 +93,11 @@ stories.add('disabled', () => ( })} /> )); + +stories.add('spellcheck disabled', () => ( + +)); diff --git a/ts/components/Input.tsx b/ts/components/Input.tsx index 3786d32c23..a4e335d4ac 100644 --- a/ts/components/Input.tsx +++ b/ts/components/Input.tsx @@ -1,4 +1,4 @@ -// Copyright 2021 Signal Messenger, LLC +// Copyright 2021-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { ClipboardEvent, ReactNode } from 'react'; @@ -203,7 +203,7 @@ export const Input = forwardRef< isLarge && getClassName('__input--large') ), disabled: Boolean(disabled), - spellcheck: disableSpellcheck ? 'false' : 'true', + spellCheck: !disableSpellcheck, onChange: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste,