FIX: Fallback to last post when the in-view post cannot be detected.
In certain situations the detection method fails. For example, it fails for a topic containing: a long post (~1600px height), gap, small action (focus on this), hidden reply.
This commit is contained in:
parent
87de5d9e8f
commit
7a7c6af21e
|
@ -445,6 +445,9 @@ export default {
|
|||
$selected = $articles
|
||||
.toArray()
|
||||
.find(article => article.getBoundingClientRect().top > offset);
|
||||
if (!$selected) {
|
||||
$selected = $articles[$articles.length - 1];
|
||||
}
|
||||
direction = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue