|
|
@@ -1202,6 +1202,18 @@ function initPullRequestReview() { |
|
|
|
$(this).hide(); |
|
|
|
const form = $(this).parent().find('.comment-form'); |
|
|
|
form.removeClass('hide'); |
|
|
|
const $textarea = form.find('textarea'); |
|
|
|
let $simplemde; |
|
|
|
if ($textarea.data('simplemde')) { |
|
|
|
$simplemde = $textarea.data('simplemde'); |
|
|
|
} else { |
|
|
|
issuesTribute.attach($textarea.get()); |
|
|
|
emojiTribute.attach($textarea.get()); |
|
|
|
$simplemde = setCommentSimpleMDE($textarea); |
|
|
|
$textarea.data('simplemde', $simplemde); |
|
|
|
} |
|
|
|
$textarea.focus(); |
|
|
|
$simplemde.codemirror.focus(); |
|
|
|
assingMenuAttributes(form.find('.menu')); |
|
|
|
}); |
|
|
|
// The following part is only for diff views |
|
|
@@ -1261,7 +1273,13 @@ function initPullRequestReview() { |
|
|
|
td.find("input[name='side']").val(side === 'left' ? 'previous' : 'proposed'); |
|
|
|
td.find("input[name='path']").val(path); |
|
|
|
} |
|
|
|
commentCloud.find('textarea').focus(); |
|
|
|
const $textarea = commentCloud.find('textarea'); |
|
|
|
issuesTribute.attach($textarea.get()); |
|
|
|
emojiTribute.attach($textarea.get()); |
|
|
|
|
|
|
|
const $simplemde = setCommentSimpleMDE($textarea); |
|
|
|
$textarea.focus(); |
|
|
|
$simplemde.codemirror.focus(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|