about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-02-04 16:34:21 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-02-09 12:59:48 +0100
commit8fd6c362438b8549abc3c95389c55576af159326 (patch)
tree1f8a76d1bb1e8dffc402740f83a7f9d8000b846b
parent95e2cab22ed4fdd68ca6422190aaffd11c4cb8ee (diff)
[Glitch] Spell check input fields
Port 67744ee779b97ea07e91dd076e1df25e362ff33d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
-rw-r--r--app/javascript/flavours/glitch/components/autosuggest_input.js4
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/compose_form.js1
-rw-r--r--app/javascript/flavours/glitch/features/compose/components/poll_form.js1
3 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.js b/app/javascript/flavours/glitch/components/autosuggest_input.js
index 4d751e281..1a030fb85 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}
           />
         </label>
 
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 9f57d7b1b..696188f31 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
           />
         </div>
 
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 13b7322d3..cb6b577bf 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}