aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-11-09 15:02:48 +0200
committerShpuld Shpuldson <shp@cock.li>2020-11-09 15:02:48 +0200
commitc1c207788a3599602888a9c5cadedd99561266af (patch)
tree4cf89a1ef27f9c854b3cc7df8db964a79d07392e /src
parentfb80dbbc77f25cdae818994a6d4828fa0d237504 (diff)
change method of fix to rounding
Diffstat (limited to 'src')
-rw-r--r--src/components/post_status_form/post_status_form.js12
1 files 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()