mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
fix for IS when viewport is short
This commit is contained in:
@@ -31,10 +31,14 @@ define('forum/infinitescroll', ['translator'], function(translator) {
|
||||
|
||||
var top = 20, bottom = 80;
|
||||
|
||||
var direction = currentScrollTop > previousScrollTop ? 1 : -1;
|
||||
|
||||
if (scrollPercent < top && currentScrollTop < previousScrollTop) {
|
||||
callback(-1);
|
||||
callback(direction);
|
||||
} else if (scrollPercent > bottom && currentScrollTop > previousScrollTop) {
|
||||
callback(1);
|
||||
callback(direction);
|
||||
} else if (scrollPercent < 0 && direction > 0 && viewportHeight < 0) {
|
||||
callback(direction);
|
||||
}
|
||||
|
||||
previousScrollTop = currentScrollTop;
|
||||
|
||||
Reference in New Issue
Block a user