瀏覽代碼

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

master^2
ThibG 4 年之前
committed by Eugen Rochko
父節點
當前提交
01e362316c
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. +2
    -1
      app/javascript/mastodon/features/compose/components/compose_form.js
  2. +1
    -1
      app/javascript/mastodon/features/ui/components/compose_panel.js

+ 2
- 1
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();
}
}


+ 1
- 1
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>
);


Loading…
取消
儲存