0
0
Fork 0

Merge commit 'c07cca4727' into glitch-soc/merge-upstream

Unlike upstream, kept the direct timeline endpoint, as it is still of use in
glitch-soc.
This commit is contained in:
Thibaut Girka 2019-07-07 13:49:31 +02:00
commit 7039dca12c
6 changed files with 13 additions and 34 deletions

View file

@ -118,7 +118,10 @@ class ComposeForm extends ImmutablePureComponent {
handleFocus = () => {
if (this.composeForm && !this.props.singleColumn) {
this.composeForm.scrollIntoView();
const { left, right } = this.composeForm.getBoundingClientRect();
if (left < 0 || right > (window.innerWidth || document.documentElement.clientWidth)) {
this.composeForm.scrollIntoView();
}
}
}