Skip to content

Commit 3e28fa7

Browse files
wxiaoguanglunny
andauthored
Fix EasyMDE error when input Enter (#19004)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent 814750e commit 3e28fa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/comp/EasyMDE.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) {
7474
const inputField = easyMDE.codemirror.getInputField();
7575
inputField.classList.add('js-quick-submit');
7676
easyMDE.codemirror.setOption('extraKeys', {
77-
Enter: () => {
77+
Enter: (cm) => {
7878
const tributeContainer = document.querySelector('.tribute-container');
7979
if (!tributeContainer || tributeContainer.style.display === 'none') {
80-
return window.CodeMirror.Pass;
80+
cm.execCommand('newlineAndIndent');
8181
}
8282
},
8383
Backspace: (cm) => {

0 commit comments

Comments
 (0)