diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-05-09 12:08:03 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-05-09 12:08:03 +0300 |
commit | 19c4aec32d8f4f12fe5573734a6d6b005086a3cf (patch) | |
tree | 7f35591dc48c4f8459c8152d73ba20c3743922ca /app/assets/javascripts | |
parent | 7ea12d8067357f8e846e26b05a1dc4ab3d5a5a93 (diff) | |
parent | 81b1b7633bef1da1f2db04b2a9decdea0042d93a (diff) |
Merge branch 'up-arrow-focus-discussion-comment' into 'master'
Fixed UP arrow key not editing last comment in discussion
Closes #31348
See merge request !11173
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/notes.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index d2e602a0763..194c29f4710 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -175,7 +175,7 @@ const normalizeNewlines = function(str) { if ($textarea.val() !== '') { return; } - myLastNote = $("li.note[data-author-id='" + gon.current_user_id + "'][data-editable]:last"); + myLastNote = $(`li.note[data-author-id='${gon.current_user_id}'][data-editable]:last`, $textarea.closest('.note, #notes')); if (myLastNote.length) { myLastNoteEditBtn = myLastNote.find('.js-note-edit'); return myLastNoteEditBtn.trigger('click', [true, myLastNote]); |