Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix editor inline toolbar remove on selection end

Smaug6739f4e4a3179613
diff --git a/frontend/components/MarkdownEditor/Editor.ts b/frontend/components/MarkdownEditor/Editor.ts
index 3e7e5dcf..a4c72095 100644
--- a/frontend/components/MarkdownEditor/Editor.ts
+++ b/frontend/components/MarkdownEditor/Editor.ts
@@ -130,7 +130,8 @@ export class Editor extends EventTarget {
// Prevent the default space character from being inserted
return true;
}
- public handleInlineToolbar() {
+ public async handleInlineToolbar() {
+ await new Promise(resolve => setTimeout(resolve, 10));
if (!this.inlineToolbar?.value?.element) return;
const toolbarElement = this.inlineToolbar.value.element;
toolbarElement.style.display = 'none';