diff --git a/Gemfile.lock b/Gemfile.lock index 6cd5f3e16f3..4c734a403d2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,6 +34,7 @@ PATH specs: gitlab-housekeeper (0.1.0) activesupport + awesome_print httparty rubocop diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index de67e01d650..d587964f961 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -294,7 +294,7 @@ export class AwardsHandler { } const normalizedEmoji = this.emoji.normalizeEmojiName(emoji); - const $emojiButton = this.findEmojiIcon(votesBlock, normalizedEmoji).parent(); + const $emojiButton = this.findEmojiIcon(votesBlock, normalizedEmoji).closest('button'); this.postEmoji($emojiButton, awardUrl, normalizedEmoji, () => { this.addAwardToEmojiBar(votesBlock, normalizedEmoji, checkMutuality); @@ -312,7 +312,7 @@ export class AwardsHandler { } this.addEmojiToFrequentlyUsedList(emoji); const normalizedEmoji = this.emoji.normalizeEmojiName(emoji); - const $emojiButton = this.findEmojiIcon(votesBlock, normalizedEmoji).parent(); + const $emojiButton = this.findEmojiIcon(votesBlock, normalizedEmoji).closest('button'); if ($emojiButton.length > 0) { if (this.isActive($emojiButton)) { this.decrementCounter($emojiButton, normalizedEmoji); @@ -355,7 +355,7 @@ export class AwardsHandler { const awardUrl = this.getAwardUrl(); if (emoji === 'thumbsup' || emoji === 'thumbsdown') { const mutualVote = emoji === 'thumbsup' ? 'thumbsdown' : 'thumbsup'; - const $emojiButton = votesBlock.find(`[data-name="${mutualVote}"]`).parent(); + const $emojiButton = votesBlock.find(`[data-name="${mutualVote}"]`).closest('button'); const isAlreadyVoted = $emojiButton.hasClass('active'); if (isAlreadyVoted) { this.addAward(votesBlock, awardUrl, mutualVote, false); @@ -430,7 +430,7 @@ export class AwardsHandler { } addYouToUserList(votesBlock, emoji) { - const awardBlock = this.findEmojiIcon(votesBlock, emoji).parent(); + const awardBlock = this.findEmojiIcon(votesBlock, emoji).closest('button'); const origTitle = this.getAwardTooltip(awardBlock); let users = []; if (origTitle) { diff --git a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue index e41cd344b3f..e42bf405784 100644 --- a/app/assets/javascripts/vue_shared/components/registry/registry_search.vue +++ b/app/assets/javascripts/vue_shared/components/registry/registry_search.vue @@ -1,5 +1,5 @@