From 68cb4baeb3213a2e6b24b4ad4526f1aaf6e741ec Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 27 Sep 2016 14:11:55 +0200 Subject: do not scroll items behind the navbar --- view/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index aadb4dff0..65a5311af 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -653,7 +653,7 @@ function updateConvItems(mode,data) { // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') { - $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow'); + $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight(true) }, 'slow'); if($('.collapsed-comments').length) { var scrolltoid = $('.collapsed-comments').attr('id').substring(19); $('#collapsed-comments-' + scrolltoid).slideDown(); -- cgit v1.2.3