Skip to content

Commit 0814066

Browse files
committed
Initialize SimpleMDE when making a code comment
Fix go-gitea#11704 Signed-off-by: Andrew Thornton <[email protected]>
1 parent c6cee44 commit 0814066

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

web_src/js/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,13 @@ function initPullRequestReview() {
12591259
td.find("input[name='side']").val(side === 'left' ? 'previous' : 'proposed');
12601260
td.find("input[name='path']").val(path);
12611261
}
1262-
commentCloud.find('textarea').focus();
1262+
const $textarea = commentCloud.find('textarea');
1263+
attachTribute($textarea.get(), {mentions: true, emoji: true});
1264+
1265+
// Give new write/preview data-tab name to distinguish from others
1266+
const $simplemde = setCommentSimpleMDE($textarea);
1267+
$textarea.focus();
1268+
$simplemde.codemirror.focus();
12631269
});
12641270
}
12651271

0 commit comments

Comments
 (0)