aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--view/js/main.js10
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,'');