diff --git a/js/src/forum/components/PostStreamScrubber.js b/js/src/forum/components/PostStreamScrubber.js index 8395aba3c4..733db81227 100644 --- a/js/src/forum/components/PostStreamScrubber.js +++ b/js/src/forum/components/PostStreamScrubber.js @@ -198,6 +198,7 @@ export default class PostStreamScrubber extends Component { let index = $items.first().data('index') || 0; let visible = 0; let period = ''; + let indexUpdated = false; // Now loop through each of the items in the discussion. An 'item' is // either a single post or a 'gap' of one or more posts that haven't @@ -223,8 +224,9 @@ export default class PostStreamScrubber extends Component { const visibleBottom = Math.min(height, viewportTop + viewportHeight - top); const visiblePost = visibleBottom - visibleTop; - if (top <= viewportTop) { + if (!indexUpdated) { index = parseFloat($this.data('index')) + visibleTop / height; + indexUpdated = true; } if (visiblePost > 0) {