diff options
author | silverwind <me@silverwind.io> | 2020-05-23 03:29:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 21:29:57 -0400 |
commit | 1752a976e17aab3eb65a9dfccc8109e377ab0aee (patch) | |
tree | 1924f8433f6f9614c3b29ea24b88637895354f0a | |
parent | 5789e603161aff311f8afcc15585892e783c931e (diff) | |
download | gitea-1752a976e17aab3eb65a9dfccc8109e377ab0aee.tar.gz gitea-1752a976e17aab3eb65a9dfccc8109e377ab0aee.zip |
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: https://github.com/go-gitea/gitea/issues/11559
* fix it for absent tribute too
-rw-r--r-- | web_src/js/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 84e08c1dd3..58cbd42933 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1497,7 +1497,7 @@ function setCommentSimpleMDE($editArea) { simplemde.codemirror.setOption('extraKeys', { Enter: () => { const tributeContainer = document.querySelector('.tribute-container'); - if (tributeContainer && tributeContainer.style.display !== 'none') { + if (!tributeContainer || tributeContainer.style.display === 'none') { return CodeMirror.Pass; } }, |