Skip to content

Commit 1752a97

Browse files
authored
Fix Enter not working in SimpleMDE (#11564)
* Fix Enter not working in SimpleMDE This condition was wrongly inverted, leading to all enter keys being blocked. Fixes: #11559 * fix it for absent tribute too
1 parent 5789e60 commit 1752a97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ function setCommentSimpleMDE($editArea) {
14971497
simplemde.codemirror.setOption('extraKeys', {
14981498
Enter: () => {
14991499
const tributeContainer = document.querySelector('.tribute-container');
1500-
if (tributeContainer && tributeContainer.style.display !== 'none') {
1500+
if (!tributeContainer || tributeContainer.style.display === 'none') {
15011501
return CodeMirror.Pass;
15021502
}
15031503
},

0 commit comments

Comments
 (0)