summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorJack Davison <jack.davison@student.manchester.ac.uk>2016-07-12 17:12:48 +0100
committerJack Davison <jack.davison@student.manchester.ac.uk>2016-08-17 21:25:39 +0100
commit9250953af7b3c781101fb982969ba4522fb87b30 (patch)
treec4de8dd1d8f4ceb8ef256ce1429320da36dd6984 /app/assets
parent6c1ed00afc98562e2c605aa3df313d26b3486da3 (diff)
downloadgitlab-ce-9250953af7b3c781101fb982969ba4522fb87b30.tar.gz
Fix duplicate "me" in award emoji tooltip
* Works by explicitly deleting out-of-date data attributes * No longer directly assigns to data-original-title
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/awards_handler.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
index adbe9786f4f..6cde99127b5 100644
--- a/app/assets/javascripts/awards_handler.js
+++ b/app/assets/javascripts/awards_handler.js
@@ -220,7 +220,12 @@
originalTitle = this.getAwardTooltip(awardBlock);
authors = originalTitle.split(FROM_SENTENCE_REGEX);
authors.splice(authors.indexOf('You'), 1);
- awardBlock.closest('.js-emoji-btn').removeData('original-title').attr('data-original-title', this.toSentence(authors));
+ awardBlock
+ .closest('.js-emoji-btn')
+ .removeData('title')
+ .removeAttr('data-title')
+ .removeAttr('data-original-title')
+ .attr('title', this.toSentence(authors));
return this.resetTooltip(awardBlock);
};