mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 18:04:14 +01:00
Fix EasyMDE error when input Enter (#19004)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
814750e647
commit
3e28fa72ce
1 changed files with 2 additions and 2 deletions
|
@ -74,10 +74,10 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) {
|
|||
const inputField = easyMDE.codemirror.getInputField();
|
||||
inputField.classList.add('js-quick-submit');
|
||||
easyMDE.codemirror.setOption('extraKeys', {
|
||||
Enter: () => {
|
||||
Enter: (cm) => {
|
||||
const tributeContainer = document.querySelector('.tribute-container');
|
||||
if (!tributeContainer || tributeContainer.style.display === 'none') {
|
||||
return window.CodeMirror.Pass;
|
||||
cm.execCommand('newlineAndIndent');
|
||||
}
|
||||
},
|
||||
Backspace: (cm) => {
|
||||
|
|
Loading…
Reference in a new issue