Skip to content

Node.js based forum software built for the modern web

fixes #4487

Julian Lam73c4feec2054
diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js
index 6c8f58b55b..7f769f984b 100644
--- a/public/src/client/topic/events.js
+++ b/public/src/client/topic/events.js
@@ -118,6 +118,8 @@ define('forum/topic/events', [
editedPostEl.find('img:not(.not-responsive)').addClass('img-responsive');
app.replaceSelfLinks(editedPostEl.find('a'));
posts.wrapImagesInLinks(editedPostEl.parent());
+ posts.unloadImages(editedPostEl.parent());
+ posts.loadImages();
editedPostEl.fadeIn(250);
$(window).trigger('action:posts.edited', data);
});
diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js
index 2cbe2a0d2a..5c326532ab 100644
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@ -235,9 +235,7 @@ define('forum/topic/posts', [
};
Posts.unloadImages = function(posts) {
- var images = posts.find('[component="post/content"] img:not(.not-responsive)'),
- scrollTop = $(window).scrollTop(),
- height = $(document).height();
+ var images = posts.find('[component="post/content"] img:not(.not-responsive)');
images.each(function() {
$(this).attr('data-src', $(this).attr('src'));