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
This commit is contained in:
Phil Hughes 2017-05-22 18:08:38 +00:00
commit 6cc8a376bb
1 changed files with 3 additions and 2 deletions

View File

@ -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
});
};