aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-01-24 10:40:33 +0100
committerMax Kostikov <max@kostikov.co>2019-01-24 10:40:33 +0100
commit1d314834a4d2c1a31c6eedf9889aec2ba07cc47e (patch)
tree9035ffdfb4fd32122cc2805845a4b4f2c48dc36a
parent51a7be29f50c4c62a2afb0ed155df43af9351fad (diff)
parent54806f6ee882d1d29a800f31eb42508221e59dc3 (diff)
downloadvolse-hubzilla-1d314834a4d2c1a31c6eedf9889aec2ba07cc47e.tar.gz
volse-hubzilla-1d314834a4d2c1a31c6eedf9889aec2ba07cc47e.tar.bz2
volse-hubzilla-1d314834a4d2c1a31c6eedf9889aec2ba07cc47e.zip
Merge branch 'js_fixes' into 'dev'
fix page jumping when liking a collapsed/expanded post See merge request hubzilla/core!1484
-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);