aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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()