change method of fix to rounding

This commit is contained in:
Shpuld Shpuldson 2020-11-09 15:02:48 +02:00
parent fb80dbbc77
commit c1c207788a

View file

@ -531,15 +531,13 @@ 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
}
}
this.$refs['emoji-input'].resize()
},