Skip to content

Commit 590e794

Browse files
committed
fix text-expander popup
1 parent e4c8791 commit 590e794

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

web_src/js/features/comp/EditorMarkdown.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,13 @@ function handleNewline(textarea: HTMLTextAreaElement, e: Event) {
184184
triggerEditorContentChanged(textarea);
185185
}
186186

187+
function isTextExpanderShown(textarea: HTMLElement): boolean {
188+
return Boolean(textarea.closest('text-expander')?.querySelector('.suggestions'));
189+
}
190+
187191
export function initTextareaMarkdown(textarea) {
188192
textarea.addEventListener('keydown', (e) => {
193+
if (isTextExpanderShown(textarea)) return;
189194
if (e.key === 'Tab' && !e.ctrlKey && !e.metaKey && !e.altKey) {
190195
// use Tab/Shift-Tab to indent/unindent the selected lines
191196
handleIndentSelection(textarea, e);

0 commit comments

Comments
 (0)