diff options
author | Reverite <github@reverite.sh> | 2019-07-07 16:25:42 -0700 |
---|---|---|
committer | Reverite <github@reverite.sh> | 2019-07-07 16:25:42 -0700 |
commit | 7d99f12fd03cf2f861d0747c3bbcd4a8cf454d99 (patch) | |
tree | 7b166c33fefb4bf3cc6f6dee46f5883f7428d80a /app/javascript/flavours/glitch/features/compose | |
parent | 100bb17b1317f07c0eaa89da869f960b6cff611f (diff) | |
parent | fce885f271f8651702d606406e21677280071e40 (diff) |
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/compose_form.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/compose_form.js b/app/javascript/flavours/glitch/features/compose/components/compose_form.js index 822cfa95d..3d9002fe4 100644 --- a/app/javascript/flavours/glitch/features/compose/components/compose_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/compose_form.js @@ -197,7 +197,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(); + } } } |