Commit 54806f6e authored by Mario's avatar Mario

fix page jumping when liking a collapsed/expanded post

parent ca9c29e2
......@@ -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);
......
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