about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorSorin Davidoi <sorin.davidoi@gmail.com>2017-07-24 19:54:39 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-07-24 19:54:39 +0200
commit32fa312b2acd80775ee254712003e020e3397f25 (patch)
tree6a536d85624787dbeb4a1b0a60b6d0c2e274f570 /app/javascript
parent1306d637a209393826cc5bf830864a281db71066 (diff)
fix(compose_from): Do not autofocus on mobile (#4344)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/features/compose/components/compose_form.js3
1 files changed, 2 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 4400c89c8..7a7a20bb8 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
@@ -15,6 +15,7 @@ import SensitiveButtonContainer from '../containers/sensitive_button_container';
 import EmojiPickerDropdown from './emoji_picker_dropdown';
 import UploadFormContainer from '../containers/upload_form_container';
 import WarningContainer from '../containers/warning_container';
+import { isMobile } from '../../../is_mobile';
 import ImmutablePureComponent from 'react-immutable-pure-component';
 import { length } from 'stringz';
 
@@ -179,7 +180,7 @@ export default class ComposeForm extends ImmutablePureComponent {
             onSuggestionsClearRequested={this.onSuggestionsClearRequested}
             onSuggestionSelected={this.onSuggestionSelected}
             onPaste={onPaste}
-            autoFocus={!showSearch}
+            autoFocus={!showSearch && !isMobile(window.innerWidth)}
           />
 
           <EmojiPickerDropdown onPickEmoji={this.handleEmojiPick} />