about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHinaloe <hina@hinaloe.net>2019-02-12 13:10:31 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-12 05:10:31 +0100
commit0e513ff862faf7fa9e5b89d2ab7d22fd0ab540ff (patch)
tree3bd04d94c88c60119467391eb10bec2ab88a61ad
parentaee93bfc9c7169f2e784de8572263de911922760 (diff)
Don't focus spiler input when disabled spoiler (#10017)
-rw-r--r--app/javascript/mastodon/features/compose/components/compose_form.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js
index 9e7d39166..a990e7498 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
@@ -180,7 +180,7 @@ class ComposeForm extends ImmutablePureComponent {
         <div className={`spoiler-input ${this.props.spoiler ? 'spoiler-input--visible' : ''}`}>
           <label>
             <span style={{ display: 'none' }}>{intl.formatMessage(messages.spoiler_placeholder)}</span>
-            <input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} type='text' className='spoiler-input__input'  id='cw-spoiler-input' ref={this.setSpoilerText} />
+            <input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} tabIndex={this.props.spoiler ? 0 : -1} type='text' className='spoiler-input__input'  id='cw-spoiler-input' ref={this.setSpoilerText} />
           </label>
         </div>