mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:35:15 +00:00
fixes for make scroll to mid work properly with collapsed threads: unhide the hidden items before scrolling to it, slideDown() is to slow - we must use show() here)
This commit is contained in:
parent
fcd7dc8744
commit
c530b4fb97
1 changed files with 3 additions and 2 deletions
|
@ -653,13 +653,14 @@ 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 - $('nav').outerHeight(true) }, 'slow');
|
||||
if($('.collapsed-comments').length) {
|
||||
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
||||
$('#collapsed-comments-' + scrolltoid).slideDown();
|
||||
$('#collapsed-comments-' + scrolltoid + ' .autotime').timeago();
|
||||
$('#collapsed-comments-' + scrolltoid).show();
|
||||
$('#hide-comments-' + scrolltoid).html(aStr.showfewer);
|
||||
$('#hide-comments-total-' + scrolltoid).hide();
|
||||
}
|
||||
$('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight() }, 'slow');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue