mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -1497,7 +1497,7 @@ function setCommentSimpleMDE($editArea) { | |||||||
|   simplemde.codemirror.setOption('extraKeys', { |   simplemde.codemirror.setOption('extraKeys', { | ||||||
|     Enter: () => { |     Enter: () => { | ||||||
|       const tributeContainer = document.querySelector('.tribute-container'); |       const tributeContainer = document.querySelector('.tribute-container'); | ||||||
|       if (tributeContainer && tributeContainer.style.display !== 'none') { |       if (!tributeContainer || tributeContainer.style.display === 'none') { | ||||||
|         return CodeMirror.Pass; |         return CodeMirror.Pass; | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user