Do not scroll in the compose panel on single-column (#11093)

master
ThibG 6 years ago committed by Eugen Rochko
parent 0828126784
commit 01e362316c
  1. 3
      app/javascript/mastodon/features/compose/components/compose_form.js
  2. 2
      app/javascript/mastodon/features/ui/components/compose_panel.js

@ -60,6 +60,7 @@ class ComposeForm extends ImmutablePureComponent {
onPickEmoji: PropTypes.func.isRequired, onPickEmoji: PropTypes.func.isRequired,
showSearch: PropTypes.bool, showSearch: PropTypes.bool,
anyMedia: PropTypes.bool, anyMedia: PropTypes.bool,
singleColumn: PropTypes.bool,
}; };
static defaultProps = { static defaultProps = {
@ -115,7 +116,7 @@ class ComposeForm extends ImmutablePureComponent {
} }
handleFocus = () => { handleFocus = () => {
if (this.composeForm) { if (this.composeForm && !this.props.singleColumn) {
this.composeForm.scrollIntoView(); this.composeForm.scrollIntoView();
} }
} }

@ -8,7 +8,7 @@ const ComposePanel = () => (
<div className='compose-panel'> <div className='compose-panel'>
<SearchContainer openInRoute /> <SearchContainer openInRoute />
<NavigationContainer /> <NavigationContainer />
<ComposeFormContainer /> <ComposeFormContainer singleColumn />
<LinkFooter withHotkeys /> <LinkFooter withHotkeys />
</div> </div>
); );

Loading…
Cancel
Save