aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-11-09 14:42:16 +0200
committerShpuld Shpuldson <shp@cock.li>2020-11-09 14:42:16 +0200
commit553155fc490d289242a0e57efab8de2834278959 (patch)
treef9faf2128db2c3e52f962de52426d522176c9801 /src
parent3963f240d5a866a52fb02edf3eb2ff879a9bc875 (diff)
prevent call to scroll if the value doesn't change because firefox is stupid
Diffstat (limited to 'src')
-rw-r--r--src/components/post_status_form/post_status_form.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index de583269..6a4efc2c 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -533,10 +533,12 @@ const PostStatusForm = {
const totalDelta = shouldScrollToBottom ? bottomChangeDelta : 0
const targetScroll = currentScroll + totalDelta
- if (scrollerRef === window) {
- scrollerRef.scroll(0, targetScroll)
- } else {
- scrollerRef.scrollTop = targetScroll
+ if (totalDelta >= 1) {
+ if (scrollerRef === window) {
+ scrollerRef.scroll(0, targetScroll)
+ } else {
+ scrollerRef.scrollTop = targetScroll
+ }
}
this.$refs['emoji-input'].resize()