diff options
author | Phil Hughes <me@iamphill.com> | 2017-05-08 16:31:11 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-08 16:31:11 +0300 |
commit | ee01ebd9e4be07090cd5afb7ea69d4a301dbf642 (patch) | |
tree | 596d67f422f05d8cd988be85b8a9e263aa43392d /app | |
parent | 59c9ec5ce6ef5a59fe989a06f0b8fa94aaba31d7 (diff) |
Fixed UP arrow key not editing last comment in discussion
Closes #31348
Diffstat (limited to 'app')
-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 55391ebc089..80adf8f0885 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]); |