summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-22 18:08:38 +0000
committerPhil Hughes <me@iamphill.com>2017-05-22 18:08:38 +0000
commit6cc8a376bb8b7b9712544f13881e12d1b026ceda (patch)
tree436640e7778cfa7fb1f5343f51a278d7a0dd574a
parent18a6d9c5326bc2b90a1f0cc8664d638a39885924 (diff)
parent5563bf9ce6dbdb168be493e1b278bdc2f5752be8 (diff)
downloadgitlab-ce-6cc8a376bb8b7b9712544f13881e12d1b026ceda.tar.gz
Merge branch 'fix-weird-jquery-data-attribute-caching-issue-in-notes' into 'master'
Fix jQuery data attribute caching issue causing expanding issues Closes #32705 See merge request !11609
-rw-r--r--app/assets/javascripts/notes.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index a981b61f942..b0b1cfd6c8a 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -860,11 +860,12 @@ const normalizeNewlines = function(str) {
Notes.prototype.onAddDiffNote = function(e) {
e.preventDefault();
- const $link = $(e.currentTarget || e.target);
+ const link = e.currentTarget || e.target;
+ const $link = $(link);
const showReplyInput = !$link.hasClass('js-diff-comment-avatar');
this.toggleDiffNote({
target: $link,
- lineType: $link.data('lineType'),
+ lineType: link.dataset.lineType,
showReplyInput
});
};