aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-01-23 15:36:34 +0100
committerMario Vavti <mario@mariovavti.com>2019-01-23 15:36:34 +0100
commit54806f6ee882d1d29a800f31eb42508221e59dc3 (patch)
tree53e86c1ed8362282090868c348eaacf945ed55af /view/js
parentca9c29e2b6e999608ef178fce89fe31da5c78b30 (diff)
downloadvolse-hubzilla-54806f6ee882d1d29a800f31eb42508221e59dc3.tar.gz
volse-hubzilla-54806f6ee882d1d29a800f31eb42508221e59dc3.tar.bz2
volse-hubzilla-54806f6ee882d1d29a800f31eb42508221e59dc3.zip
fix page jumping when liking a collapsed/expanded post
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index ee11ab1c6..d88133b23 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -845,10 +845,10 @@ function collapseHeight() {
});
var collapsedContentHeight = Math.ceil($("#region_2").height());
- contentHeightDiff = origContentHeight - collapsedContentHeight;
+ contentHeightDiff = liking ? 0 : origContentHeight - collapsedContentHeight;
console.log('collapseHeight() - contentHeightDiff: ' + contentHeightDiff + 'px');
- if(i){
+ if(i && !liking){
var sval = position - cDiff + ($(".divgrow-showmore").outerHeight() * i);
console.log('collapsed above viewport count: ' + i);
$(window).scrollTop(sval);