fix for IS when viewport is short

v1.18.x
barisusakli 9 years ago
parent df89a62b32
commit e02781f7e8

@ -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;

Loading…
Cancel
Save