From 71629f6f9994c23f5d21775851c936179d01c437 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sat, 4 Feb 2023 16:34:21 +0100 Subject: [PATCH] [Glitch] Spell check input fields Port 9b74ffa7e090bb84bd41827c96d63a86e26c73b4 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/components/autosuggest_input.js | 4 +++- .../glitch/features/compose/components/compose_form.js | 1 + .../flavours/glitch/features/compose/components/poll_form.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.js b/app/javascript/flavours/glitch/components/autosuggest_input.js index 4d751e2812..1a030fb858 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_input.js +++ b/app/javascript/flavours/glitch/components/autosuggest_input.js @@ -51,6 +51,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { searchTokens: PropTypes.arrayOf(PropTypes.string), maxLength: PropTypes.number, lang: PropTypes.string, + spellCheck: PropTypes.string, }; static defaultProps = { @@ -186,7 +187,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { }; render () { - const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang } = this.props; + const { value, suggestions, disabled, placeholder, onKeyUp, autoFocus, className, id, maxLength, lang, spellCheck } = this.props; const { suggestionsHidden } = this.state; return ( @@ -212,6 +213,7 @@ export default class AutosuggestInput extends ImmutablePureComponent { className={className} maxLength={maxLength} lang={lang} + spellCheck={spellCheck} /> diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js index 9f57d7b1b2..696188f31a 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -332,6 +332,7 @@ class ComposeForm extends ImmutablePureComponent { className='spoiler-input__input' lang={this.props.lang} autoFocus={false} + spellCheck /> diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.js b/app/javascript/flavours/glitch/features/compose/components/poll_form.js index 13b7322d3e..cb6b577bf8 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.js @@ -72,6 +72,7 @@ class Option extends React.PureComponent { maxLength={pollLimits.max_option_chars} value={title} lang={lang} + spellCheck onChange={this.handleOptionTitleChange} suggestions={this.props.suggestions} onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}