Skip to content

Commit 13c997a

Browse files
committed
Fix reaction possition when there is attachments
1 parent 3b89ee5 commit 13c997a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

public/js/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ function initReactionSelector(parent) {
151151
react.remove();
152152
}
153153
if (!resp.empty) {
154-
react = $('<div class="ui attached segment reactions"></div>').appendTo(content);
154+
react = $('<div class="ui attached segment reactions"></div>');
155+
var attachments = content.find('.segment.bottom:first');
156+
if (attachments.length > 0) {
157+
react.insertBefore(attachments);
158+
} else {
159+
react.appendTo(content);
160+
}
155161
react.html(resp.html);
156162
var hasEmoji = react.find('.has-emoji');
157163
for (var i = 0; i < hasEmoji.length; i++) {

0 commit comments

Comments
 (0)