]> cat aescling's git repositories - mastodon.git/commitdiff
Do not scroll in the compose panel on single-column (#11093)
authorThibG <thib@sitedethib.com>
Sun, 16 Jun 2019 16:46:55 +0000 (18:46 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 16 Jun 2019 16:46:55 +0000 (18:46 +0200)
app/javascript/mastodon/features/compose/components/compose_form.js
app/javascript/mastodon/features/ui/components/compose_panel.js

index 60d6ce6733d97f3ca74d208aacf355ef43039418..c846ad6e7d2500cc3001b9c7bb95b6a7ec6c4971 100644 (file)
@@ -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();
     }
   }
index a05fbbe39ce58f0878374ddce801fb88345a37d9..c7821f473a1a3a7afeb802a49bfb2f4d256b4d1a 100644 (file)
@@ -8,7 +8,7 @@ const ComposePanel = () => (
   <div className='compose-panel'>
     <SearchContainer openInRoute />
     <NavigationContainer />
-    <ComposeFormContainer />
+    <ComposeFormContainer singleColumn />
     <LinkFooter withHotkeys />
   </div>
 );