commit: e6ca489d302fe4d1e9379067bbf1bbb02ed3e87b
parent 3963f240d5a866a52fb02edf3eb2ff879a9bc875
Author: Shpuld Shpludson <shp@cock.li>
Date: Mon, 9 Nov 2020 13:18:35 +0000
Merge branch 'fix/fix-1px-scroll-on-input' into 'develop'
Fix that 1px scroll on input for real this time maybe
See merge request pleroma/pleroma-fe!1282
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Fixed
- Fixed regression in react popup alignment and overflowing
+- Fixed the occasional bug where screen would scroll 1px when typing into a reply form
## [2.2.0] - 2020-11-06
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
@@ -531,7 +531,7 @@ 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 (scrollerRef === window) {
scrollerRef.scroll(0, targetScroll)