mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-27 00:23:41 +09:00 
			
		
		
		
	Make issue suggestion work for all editors (#33340)
And do not handle special keys when the text-expander popup exists
This commit is contained in:
		| @@ -184,8 +184,13 @@ function handleNewline(textarea: HTMLTextAreaElement, e: Event) { | ||||
|   triggerEditorContentChanged(textarea); | ||||
| } | ||||
|  | ||||
| function isTextExpanderShown(textarea: HTMLElement): boolean { | ||||
|   return Boolean(textarea.closest('text-expander')?.querySelector('.suggestions')); | ||||
| } | ||||
|  | ||||
| export function initTextareaMarkdown(textarea) { | ||||
|   textarea.addEventListener('keydown', (e) => { | ||||
|     if (isTextExpanderShown(textarea)) return; | ||||
|     if (e.key === 'Tab' && !e.ctrlKey && !e.metaKey && !e.altKey) { | ||||
|       // use Tab/Shift-Tab to indent/unindent the selected lines | ||||
|       handleIndentSelection(textarea, e); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user