mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 11:48:06 +01:00
Do not scroll in the compose panel on single-column
This commit is contained in:
parent
a29ab6f1bd
commit
d3aaacb6d4
2 changed files with 5 additions and 3 deletions
|
@ -55,6 +55,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
onPickEmoji: PropTypes.func,
|
||||
showSearch: PropTypes.bool,
|
||||
anyMedia: PropTypes.bool,
|
||||
singleColumn: PropTypes.bool,
|
||||
|
||||
advancedOptions: ImmutablePropTypes.map,
|
||||
layout: PropTypes.string,
|
||||
|
@ -195,7 +196,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
handleFocus = () => {
|
||||
if (this.composeForm) {
|
||||
if (this.composeForm && !this.props.singleColumn) {
|
||||
this.composeForm.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
@ -219,6 +220,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
preselectDate,
|
||||
text,
|
||||
preselectOnReply,
|
||||
singleColumn,
|
||||
} = this.props;
|
||||
let selectionEnd, selectionStart;
|
||||
|
||||
|
@ -238,7 +240,7 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
if (textarea) {
|
||||
textarea.setSelectionRange(selectionStart, selectionEnd);
|
||||
textarea.focus();
|
||||
textarea.scrollIntoView();
|
||||
if (!singleColumn) textarea.scrollIntoView();
|
||||
}
|
||||
|
||||
// Refocuses the textarea after submitting.
|
||||
|
|
|
@ -8,7 +8,7 @@ const ComposePanel = () => (
|
|||
<div className='compose-panel'>
|
||||
<SearchContainer openInRoute />
|
||||
<NavigationContainer />
|
||||
<ComposeFormContainer />
|
||||
<ComposeFormContainer singleColumn />
|
||||
<LinkFooter withHotkeys />
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue