aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-09-29 11:07:53 +0200
committerMario Vavti <mario@mariovavti.com>2016-09-29 11:07:53 +0200
commitc530b4fb977e4d3ecf797c79a00887bc54f9abf5 (patch)
tree0a697b6b31ada1f9baf5083e225853a8ae237a5f /view
parentfcd7dc87447eee14277958a3b56080310ab6f352 (diff)
downloadvolse-hubzilla-c530b4fb977e4d3ecf797c79a00887bc54f9abf5.tar.gz
volse-hubzilla-c530b4fb977e4d3ecf797c79a00887bc54f9abf5.tar.bz2
volse-hubzilla-c530b4fb977e4d3ecf797c79a00887bc54f9abf5.zip
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)
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 65a5311af..bbf2b7161 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -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');
}
}