Skip to content

Commit

Permalink
Fix PostStreamScrubber click (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
w-4 authored Apr 10, 2020
1 parent cd9edf6 commit 117c2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/forum/components/PostStreamScrubber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 117c2f6

Please sign in to comment.