iron out some kinks with scrollToItem() in combination with collapsed content and images
(cherry picked from commit 2244bf2ba2
)
This commit is contained in:
parent
6aa041b193
commit
aa6a31eba5
@ -770,7 +770,7 @@ function updateConvItems(mode,data) {
|
||||
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;
|
||||
|
||||
if (bimgcount) {
|
||||
@ -778,17 +778,23 @@ function updateConvItems(mode,data) {
|
||||
bimgcount--;
|
||||
if (! bimgcount) {
|
||||
collapseHeight();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
collapseHeight();
|
||||
}
|
||||
|
||||
if(bParam_mid && mode === 'replace')
|
||||
scrollToItem();
|
||||
|
||||
$(document.body).trigger("sticky_kit:recalc");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
collapseHeight();
|
||||
|
||||
if(bParam_mid && mode === 'replace')
|
||||
scrollToItem();
|
||||
|
||||
$(document.body).trigger("sticky_kit:recalc");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function scrollToItem() {
|
||||
// auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
|
||||
|
Reference in New Issue
Block a user