diff --git a/src/hooks.ts b/src/hooks.ts index 820c32f..f6d52f5 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -167,9 +167,10 @@ async function onOpenNote( workspaceUID?: string; lineIndex?: number; sectionName?: string; + forceTakeover?: boolean; } = {}, ) { - if (!getPref("openNote.takeover")) { + if (!options.forceTakeover && !getPref("openNote.takeover")) { ZoteroPane.openNoteWindow(noteId); return; } diff --git a/src/modules/userGuide.ts b/src/modules/userGuide.ts index c39dada..0b70e6b 100644 --- a/src/modules/userGuide.ts +++ b/src/modules/userGuide.ts @@ -117,7 +117,9 @@ You can find more information in the following links: showButtons: ["next"], showProgress: true, onBeforeRender: async ({ state: { step, controller } }) => { - tabID = (await addon.hooks.onOpenNote(noteItem!.id, "tab")) as string; + tabID = (await addon.hooks.onOpenNote(noteItem!.id, "tab", { + forceTakeover: true, + })) as string; if (!tabID) { controller.abort();