change method of fix to rounding
This commit is contained in:
parent
fb80dbbc77
commit
c1c207788a
1 changed files with 5 additions and 7 deletions
|
@ -531,14 +531,12 @@ const PostStatusForm = {
|
||||||
!(isFormBiggerThanScroller &&
|
!(isFormBiggerThanScroller &&
|
||||||
this.$refs.textarea.selectionStart !== this.$refs.textarea.value.length)
|
this.$refs.textarea.selectionStart !== this.$refs.textarea.value.length)
|
||||||
const totalDelta = shouldScrollToBottom ? bottomChangeDelta : 0
|
const totalDelta = shouldScrollToBottom ? bottomChangeDelta : 0
|
||||||
const targetScroll = currentScroll + totalDelta
|
const targetScroll = Math.round(currentScroll + totalDelta)
|
||||||
|
|
||||||
if (totalDelta >= 1) {
|
if (scrollerRef === window) {
|
||||||
if (scrollerRef === window) {
|
scrollerRef.scroll(0, targetScroll)
|
||||||
scrollerRef.scroll(0, targetScroll)
|
} else {
|
||||||
} else {
|
scrollerRef.scrollTop = targetScroll
|
||||||
scrollerRef.scrollTop = targetScroll
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$refs['emoji-input'].resize()
|
this.$refs['emoji-input'].resize()
|
||||||
|
|
Loading…
Reference in a new issue