Prevent prefix continuation if currently a text expander popup is open
This fixes that mentions and emoji autocompletion was broken in e.g. a list, because the list handling take presidency over the text expansion.
This commit is contained in:
parent
e35afe475a
commit
276ef10dd5
2 changed files with 28 additions and 0 deletions
|
@ -99,6 +99,8 @@ class ComboMarkdownEditor {
|
|||
e.target._shiftDown = true;
|
||||
}
|
||||
if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.altKey) {
|
||||
// Prevent special line break handling if currently a text expander popup is open
|
||||
if (this.textarea.hasAttribute('aria-expanded')) return;
|
||||
if (!this.breakLine()) return; // Nothing changed, let the default handler work.
|
||||
this.options?.onContentChanged?.(this, e);
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue