summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-12-06 05:17:50 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-06 11:17:50 +0800
commitc7fb6e30870ea1abff13a8214107e0747d293320 (patch)
treec95ecfde7e2295c4863fee384093941ae56db908 /public
parentf1d8dda5b4031ccada00e43b64113f65601b906e (diff)
downloadgitea-c7fb6e30870ea1abff13a8214107e0747d293320.tar.gz
gitea-c7fb6e30870ea1abff13a8214107e0747d293320.zip
Fix reaction possition when there is attachments (#3099)
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index c56030f349..28377ce231 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -151,7 +151,13 @@ function initReactionSelector(parent) {
react.remove();
}
if (!resp.empty) {
- react = $('<div class="ui attached segment reactions"></div>').appendTo(content);
+ react = $('<div class="ui attached segment reactions"></div>');
+ var attachments = content.find('.segment.bottom:first');
+ if (attachments.length > 0) {
+ react.insertBefore(attachments);
+ } else {
+ react.appendTo(content);
+ }
react.html(resp.html);
var hasEmoji = react.find('.has-emoji');
for (var i = 0; i < hasEmoji.length; i++) {