From 8dca79ecf27984e6e6c85e3c57e423c9836eaf86 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 11 Jul 2025 16:51:24 +0300 Subject: [PATCH] fix(popup_editor): block toolbar from behind modal interfering --- apps/client/src/widgets/dialogs/popup_editor.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/client/src/widgets/dialogs/popup_editor.ts b/apps/client/src/widgets/dialogs/popup_editor.ts index 76938aba8..30ffaee43 100644 --- a/apps/client/src/widgets/dialogs/popup_editor.ts +++ b/apps/client/src/widgets/dialogs/popup_editor.ts @@ -108,6 +108,11 @@ export default class PopupEditorDialog extends Container { await this.noteContext.setNote(noteIdOrPath); + const activeEl = document.activeElement; + if (activeEl && "blur" in activeEl) { + (activeEl as HTMLElement).blur(); + } + $dialog.on("shown.bs.modal", async () => { // Reduce the z-index of modals so that ckeditor popups are properly shown on top of it. // The backdrop instance is not shared so it's OK to make a one-off modification.