diff options
author | Phil Hughes <me@iamphill.com> | 2017-05-22 18:08:38 +0000 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-05-22 16:37:37 -0500 |
commit | 2f76387754437efbc8c3a4838ec1bfda17ab4bb4 (patch) | |
tree | 5832708e786097fd05c1d184a442ca98feeff92c | |
parent | 1ccd2fc3d498498cbb084ad085b5c2f7bfa1dd2c (diff) | |
download | gitlab-ce-2f76387754437efbc8c3a4838ec1bfda17ab4bb4.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.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index c2a0cb60f45..233c2e637af 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -858,11 +858,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 }); }; |