iron out some kinks with scrollToItem() in combination with collapsed content and images
This commit is contained in:
parent
de7f2eef47
commit
2244bf2ba2
@ -770,7 +770,7 @@ function updateConvItems(mode,data) {
|
|||||||
mediaPlaying = false;
|
mediaPlaying = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
var bimgs = ((preloadImages) ? false : $(".wall-item-body img, .wall-photo-item img").not(function() { return this.complete; }));
|
var bimgs = $(".wall-item-body img, .wall-photo-item img").not(function() { return this.complete; });
|
||||||
var bimgcount = bimgs.length;
|
var bimgcount = bimgs.length;
|
||||||
|
|
||||||
if (bimgcount) {
|
if (bimgcount) {
|
||||||
@ -778,16 +778,22 @@ function updateConvItems(mode,data) {
|
|||||||
bimgcount--;
|
bimgcount--;
|
||||||
if (! bimgcount) {
|
if (! bimgcount) {
|
||||||
collapseHeight();
|
collapseHeight();
|
||||||
|
|
||||||
|
if(bParam_mid && mode === 'replace')
|
||||||
|
scrollToItem();
|
||||||
|
|
||||||
|
$(document.body).trigger("sticky_kit:recalc");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
collapseHeight();
|
collapseHeight();
|
||||||
|
|
||||||
|
if(bParam_mid && mode === 'replace')
|
||||||
|
scrollToItem();
|
||||||
|
|
||||||
|
$(document.body).trigger("sticky_kit:recalc");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bParam_mid && mode === 'replace')
|
|
||||||
scrollToItem();
|
|
||||||
|
|
||||||
$(document.body).trigger("sticky_kit:recalc");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrollToItem() {
|
function scrollToItem() {
|
||||||
|
Reference in New Issue
Block a user