diff --git a/apps/client/src/widgets/dialogs/popup_editor.ts b/apps/client/src/widgets/dialogs/popup_editor.ts index fed105515..f08719a93 100644 --- a/apps/client/src/widgets/dialogs/popup_editor.ts +++ b/apps/client/src/widgets/dialogs/popup_editor.ts @@ -150,13 +150,13 @@ export default class PopupEditorDialog extends Container { } handleEventInChildren(name: T, data: EventData): Promise | null { - // Avoid not showing recent notes when creating a new empty tab. - if (name === 'activeContextChanged' && "noteContext" in data && data.noteContext.isEmpty()) { + // Avoid events related to the current tab interfere with our popup. + if (["noteSwitched", "noteSwitchedAndActivated", "exportAsPdf", "printActiveNote"].includes(name)) { return Promise.resolve(); } - // Avoid events related to the current tab interfere with our popup. - if (["noteSwitched", "noteSwitchedAndActivated", "exportAsPdf", "printActiveNote"].includes(name)) { + // Avoid not showing recent notes when creating a new empty tab. + if ("noteContext" in data && data.noteContext.ntxId !== "_popup-editor") { return Promise.resolve(); }