summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/notes.js.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index a3d0d212bed..c2e103ff857 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -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()