Commit ddbc3518 authored by Mario's avatar Mario Committed by Mario

fix page jumping when liking a collapsed/expanded post


(cherry picked from commit 54806f6e)
parent 57dde3e9
Pipeline #106740 passed with stage
in 13 minutes and 29 seconds
......@@ -832,10 +832,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment