do not scroll items behind the navbar
This commit is contained in:
parent
c28ba24525
commit
68cb4baeb3
@ -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
|
// 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') {
|
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) {
|
if($('.collapsed-comments').length) {
|
||||||
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
||||||
$('#collapsed-comments-' + scrolltoid).slideDown();
|
$('#collapsed-comments-' + scrolltoid).slideDown();
|
||||||
|
Reference in New Issue
Block a user