diff options
author | ThibG <thib@sitedethib.com> | 2019-06-16 18:46:55 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-16 18:46:55 +0200 |
commit | 01e362316c5273ab5ae6acaa44834260b731fe57 (patch) | |
tree | 6a6791e36bd15db5df2c19861badcaf494406899 /app | |
parent | 082812678411429e1c0d8ce628a428916bb7c703 (diff) |
Do not scroll in the compose panel on single-column (#11093)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/compose_form.js | 3 | ||||
-rw-r--r-- | app/javascript/mastodon/features/ui/components/compose_panel.js | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 60d6ce673..c846ad6e7 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -60,6 +60,7 @@ class ComposeForm extends ImmutablePureComponent { onPickEmoji: PropTypes.func.isRequired, showSearch: PropTypes.bool, anyMedia: PropTypes.bool, + singleColumn: PropTypes.bool, }; static defaultProps = { @@ -115,7 +116,7 @@ class ComposeForm extends ImmutablePureComponent { } handleFocus = () => { - if (this.composeForm) { + if (this.composeForm && !this.props.singleColumn) { this.composeForm.scrollIntoView(); } } diff --git a/app/javascript/mastodon/features/ui/components/compose_panel.js b/app/javascript/mastodon/features/ui/components/compose_panel.js index a05fbbe39..c7821f473 100644 --- a/app/javascript/mastodon/features/ui/components/compose_panel.js +++ b/app/javascript/mastodon/features/ui/components/compose_panel.js @@ -8,7 +8,7 @@ const ComposePanel = () => ( <div className='compose-panel'> <SearchContainer openInRoute /> <NavigationContainer /> - <ComposeFormContainer /> + <ComposeFormContainer singleColumn /> <LinkFooter withHotkeys /> </div> ); |