Merge branch 'js_fixes' into 'dev'

fix page jumping when liking a collapsed/expanded post

See merge request hubzilla/core!1484
This commit is contained in:
Max Kostikov 2019-01-24 10:40:33 +01:00
commit 1d314834a4

View File

@ -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);