aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-12 09:09:31 +0000
committerMario <mario@mariovavti.com>2019-12-12 09:09:31 +0000
commit124cc4396247c75c14280136cfaa95415860ad4c (patch)
tree15e2a9157707c8c04733ce89fb987ed77e97472f
parent4237dd457e2e16830a758f633d10500f7a535238 (diff)
downloadvolse-hubzilla-124cc4396247c75c14280136cfaa95415860ad4c.tar.gz
volse-hubzilla-124cc4396247c75c14280136cfaa95415860ad4c.tar.bz2
volse-hubzilla-124cc4396247c75c14280136cfaa95415860ad4c.zip
when ajax loading new posts, always scroll to top first
-rw-r--r--view/js/main.js1
-rw-r--r--view/tpl/notifications_widget.tpl1
2 files changed, 1 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 84fa44d4a..66a0bda2f 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -826,7 +826,6 @@ function scrollToItem() {
$('html, body').animate({ scrollTop: $(this).offset().top - $('nav').outerHeight(true) }, 'slow');
$(this).addClass('item-highlight');
}
-
});
}
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 9191c2470..5e96c2767 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -117,6 +117,7 @@
{{/foreach}}
function getData(b64mid, notify_id) {
+ $(document).scrollTop(0);
$('.thread-wrapper').remove();
bParam_mid = b64mid;
mode = 'replace';