From 553155fc490d289242a0e57efab8de2834278959 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 9 Nov 2020 14:42:16 +0200 Subject: [PATCH] prevent call to scroll if the value doesn't change because firefox is stupid --- src/components/post_status_form/post_status_form.js | 10 ++++++---- 1 file 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 de583269de..6a4efc2c96 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()