mirror of
https://github.com/redmine/redmine.git
synced 2026-01-26 17:30:00 +01:00
Merged r22791 from trunk to 5.1-stable (#40556).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22796 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -6,3 +6,13 @@ if ($("form#journal-<%= @journal.id %>-form").length > 0) {
|
||||
} else {
|
||||
$("#journal-<%= @journal.id %>-notes").after('<%= escape_javascript(render :partial => 'notes_form') %>');
|
||||
}
|
||||
|
||||
// Focus on the textarea
|
||||
(() => {
|
||||
const textarea = $("#journal-<%= @journal.id %>-form .wiki-edit");
|
||||
if (textarea.length > 0) {
|
||||
textarea.focus();
|
||||
const textareaLength = textarea.val().length;
|
||||
textarea.get(0).setSelectionRange(textareaLength, textareaLength);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user