diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-05 18:13:00 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-05 18:13:00 +0200 |
commit | 14eb4326e76bddaec8421fdaa87e0c3ac9bb76e0 (patch) | |
tree | e8fab6bada4cc06932ee64fa717144c5a3262343 | |
parent | 89a3e8fcc7d8842bc26c67d07586e8c9c2929887 (diff) | |
download | volse-hubzilla-14eb4326e76bddaec8421fdaa87e0c3ac9bb76e0.tar.gz volse-hubzilla-14eb4326e76bddaec8421fdaa87e0c3ac9bb76e0.tar.bz2 volse-hubzilla-14eb4326e76bddaec8421fdaa87e0c3ac9bb76e0.zip |
Scroll back to initial low level comment
-rw-r--r-- | view/js/main.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js index 8dfb04779..5592fd63d 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1160,8 +1160,14 @@ function doreply(parent, ident, owner, hint) { } function doscroll(parent, hidden) { - $('.back-to-reply').remove(); - var pos = $(window).scrollTop(); + var back = $('.back-to-reply'); + if(back.length == 0) { + var pos = Math.round($(window).scrollTop()); + } + else { + var pos = back.attr('href').replace(/\D/g,'') + } + back.remove(); var x = '#hide-comments-outer-' + hidden.toString(); if($(x).length !== 0) { x = $(x).attr("onclick").replace(/\D/g,''); |