From c1c207788a3599602888a9c5cadedd99561266af Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 9 Nov 2020 15:02:48 +0200 Subject: [PATCH] change method of fix to rounding --- src/components/post_status_form/post_status_form.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6a4efc2c..3ff4a3c8 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -531,14 +531,12 @@ const PostStatusForm = { !(isFormBiggerThanScroller && this.$refs.textarea.selectionStart !== this.$refs.textarea.value.length) const totalDelta = shouldScrollToBottom ? bottomChangeDelta : 0 - const targetScroll = currentScroll + totalDelta + const targetScroll = Math.round(currentScroll + totalDelta) - if (totalDelta >= 1) { - if (scrollerRef === window) { - scrollerRef.scroll(0, targetScroll) - } else { - scrollerRef.scrollTop = targetScroll - } + if (scrollerRef === window) { + scrollerRef.scroll(0, targetScroll) + } else { + scrollerRef.scrollTop = targetScroll } this.$refs['emoji-input'].resize()