diff options
author | M. Dent <dentm42@gmail.com> | 2019-03-01 17:43:16 +0100 |
---|---|---|
committer | M. Dent <dentm42@gmail.com> | 2019-03-01 17:43:16 +0100 |
commit | 7fa874d9ef5c5c552821a9df95880992f267349d (patch) | |
tree | 2413c9f048ac539cc227ae1c903b1537227ea273 | |
parent | de7f2eef47b06d2711473e50efd29ae12110e459 (diff) | |
parent | 2244bf2ba2e8611017de51fbeb3c449efef906f0 (diff) | |
download | volse-hubzilla-7fa874d9ef5c5c552821a9df95880992f267349d.tar.gz volse-hubzilla-7fa874d9ef5c5c552821a9df95880992f267349d.tar.bz2 volse-hubzilla-7fa874d9ef5c5c552821a9df95880992f267349d.zip |
Merge branch 'js_fixes' into 'dev'
iron out some kinks with scrollToItem() in combination with collapsed content and images
See merge request hubzilla/core!1534
-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() { |