Node.js based forum software built for the modern web
scroll fix
Baris Soner Usakli8064f7f0dbed
diff --git a/public/src/app.js b/public/src/app.jsindex 3201e2b563..621fd0f44c 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -446,8 +446,6 @@ var socket,var previousScrollTop = 0;--app.enableInfiniteLoading = function(callback) {$(window).off('scroll').on('scroll', function() {diff --git a/public/src/forum/topic.js b/public/src/forum/topic.jsindex 1f3c58a24b..84eafc8621 100644--- a/public/src/forum/topic.js+++ b/public/src/forum/topic.js@@ -1027,14 +1027,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {}$('#pagination').html(index + ' out of ' + Topic.postCount);$('.progress-bar').width((index / Topic.postCount * 100) + '%');- return false;- }- });- $('.posts > .post-row').each(function() {- var el = $(this);-- if (elementInView(el)) {if(!parseInt(el.attr('data-index'), 10)) {localStorage.removeItem('topic:' + templates.get('topic_id') + ':bookmark');} else {@@ -1063,7 +1056,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {var elTop = el.offset().top;var elBottom = elTop + Math.floor(el.height());- return !(elTop > scrollBottom || elBottom < scrollTop);+ return (elTop >= scrollTop && elBottom <= scrollBottom) || (elTop <= scrollTop && elBottom >= scrollTop);}Topic.scrollToPost = function(pid, highlight, duration, offset) {