diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-05 15:38:08 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-05 15:38:08 +0200 |
commit | c98f3c5d29df460963cba1728db664e3d61dd1b1 (patch) | |
tree | 9bb8325b9250cc880b4844ee0510edef26c0acbc | |
parent | 5c8de9d82fc21e71e528db069bb3b1dce682068f (diff) | |
download | volse-hubzilla-c98f3c5d29df460963cba1728db664e3d61dd1b1.tar.gz volse-hubzilla-c98f3c5d29df460963cba1728db664e3d61dd1b1.tar.bz2 volse-hubzilla-c98f3c5d29df460963cba1728db664e3d61dd1b1.zip |
Threaded comments navigation elements fixes
-rw-r--r-- | view/js/main.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index 5f9f9044f..8dfb04779 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1160,6 +1160,7 @@ function doreply(parent, ident, owner, hint) { } function doscroll(parent, hidden) { + $('.back-to-reply').remove(); var pos = $(window).scrollTop(); var x = '#hide-comments-outer-' + hidden.toString(); if($(x).length !== 0) { @@ -1167,10 +1168,10 @@ function doscroll(parent, hidden) { var c = '#collapsed-comments-' + x; if($(c).length !== 0 && (! $(c).is(':visible'))) { showHideComments(x); - pos += $('#collapsed-comments-' + x).height(); + pos += $(c).height(); } } - id = $('[data-mid="' + parent + '"]'); + var id = $('[data-mid="' + parent + '"]'); $('html, body').animate({scrollTop:(id.offset().top) - 50}, 'slow'); $('<a href="javascript:doscrollback(' + pos + ');" class="back-to-reply" title="' + aStr['to_reply'] + '"><i class="fa fa-angle-double-down float-right"> </i></a>').insertBefore('#wall-item-info-' + id.attr('id').replace(/\D/g,'')); } |