diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index b5bbd57b5..65a5311af 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -652,8 +652,8 @@ function updateConvItems(mode,data) { } // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode - if(bParam_mid && mode == 'replace') { - $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow'); + if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') { + $('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(); |