BigW Consortium Gitlab

Commit 262ca7b6 by Jacob Schatz

When editing put the cursor at the end of the textarea

parent f2d94c5d
......@@ -374,7 +374,11 @@ class @Notes
$('html, body').animate({
scrollTop: myLastNote.offset().top - 150
}, 500, ->
form.find(".js-note-text").focus()
$noteText = form.find(".js-note-text")
$noteText.focus()
# Neat little trick to put the cursor at the end
noteTextVal = $noteText.val()
$noteText.val('').val(noteTextVal);
);
else
form.find(".js-note-text").focus()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment