diff options
author | Jack Davison <jack.davison@student.manchester.ac.uk> | 2016-07-12 17:12:48 +0100 |
---|---|---|
committer | Jack Davison <jack.davison@student.manchester.ac.uk> | 2016-08-17 21:25:39 +0100 |
commit | 9250953af7b3c781101fb982969ba4522fb87b30 (patch) | |
tree | c4de8dd1d8f4ceb8ef256ce1429320da36dd6984 /app/assets | |
parent | 6c1ed00afc98562e2c605aa3df313d26b3486da3 (diff) | |
download | gitlab-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.js | 7 |
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); }; |