diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-03-01 13:16:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-03-02 15:32:36 +0100 |
commit | aa6a31eba5122a5497b3ff80f0dd4a9d5ba90d23 (patch) | |
tree | 552f1d4d0f9916bd24aabd27109a3d9c3ba4a4aa | |
parent | 6aa041b1933280992fba7dd660f0ca7f68d59075 (diff) | |
download | volse-hubzilla-aa6a31eba5122a5497b3ff80f0dd4a9d5ba90d23.tar.gz volse-hubzilla-aa6a31eba5122a5497b3ff80f0dd4a9d5ba90d23.tar.bz2 volse-hubzilla-aa6a31eba5122a5497b3ff80f0dd4a9d5ba90d23.zip |
iron out some kinks with scrollToItem() in combination with collapsed content and images
(cherry picked from commit 2244bf2ba2e8611017de51fbeb3c449efef906f0)
-rw-r--r-- | view/js/main.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index b1af29846..1322c2112 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -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,16 +778,22 @@ function updateConvItems(mode,data) { bimgcount--; if (! bimgcount) { collapseHeight(); + + if(bParam_mid && mode === 'replace') + scrollToItem(); + + $(document.body).trigger("sticky_kit:recalc"); } }); } else { collapseHeight(); - } - if(bParam_mid && mode === 'replace') - scrollToItem(); + if(bParam_mid && mode === 'replace') + scrollToItem(); + + $(document.body).trigger("sticky_kit:recalc"); + } - $(document.body).trigger("sticky_kit:recalc"); } function scrollToItem() { |