Merged r24352 from trunk to 6.1-stable (#43662).

git-svn-id: https://svn.redmine.org/redmine/branches/6.1-stable@24372 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2026-01-26 08:15:48 +00:00
parent 5e558769e5
commit 3107b05829

View File

@@ -313,14 +313,14 @@ function addInlineAttachmentMarkup(file) {
+ (newLineAfter ? '\n' : '')
+ description.substring(cursorPosition, description.length)
);
})
// move cursor into next line
cursorPosition = $textarea.prop('selectionStart');
$textarea.prop({
'selectionStart': cursorPosition + 1,
'selectionEnd': cursorPosition + 1
});
// Move cursor after the inserted markup
var newCursorPosition = cursorPosition + (newLineBefore ? 1 : 0) + imageMarkup.length;
$textarea.prop({
'selectionStart': newCursorPosition + 1,
'selectionEnd': newCursorPosition + 1
});
});
}
}