From 2fe7d962883453bc8f226fdfcdda81c286a23e81 Mon Sep 17 00:00:00 2001 From: w-4 <36057469+w-4@users.noreply.github.com> Date: Sat, 11 Apr 2020 02:16:57 +0700 Subject: [PATCH] Fix PostStreamScrubber click (#1945) --- framework/core/js/src/forum/components/PostStreamScrubber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/components/PostStreamScrubber.js b/framework/core/js/src/forum/components/PostStreamScrubber.js index 8395aba3c..cb44764bc 100644 --- a/framework/core/js/src/forum/components/PostStreamScrubber.js +++ b/framework/core/js/src/forum/components/PostStreamScrubber.js @@ -424,7 +424,7 @@ export default class PostStreamScrubber extends Component { // 1. Get the offset of the click from the top of the scrollbar, as a // percentage of the scrollbar's height. const $scrollbar = this.$('.Scrubber-scrollbar'); - const offsetPixels = (e.clientY || e.originalEvent.touches[0].clientY) - $scrollbar.offset().top + $('body').scrollTop(); + const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop(); let offsetPercent = offsetPixels / $scrollbar.outerHeight() * 100; // 2. We want the handle of the scrollbar to end up centered on the click