From 290970dbae2dc1f83fbbf76af96058f0aac375bf Mon Sep 17 00:00:00 2001 From: e-zz <37920155+e-zz@users.noreply.github.com> Date: Sat, 13 Jul 2024 20:25:50 +0200 Subject: [PATCH] fix: `navToLogseqBlock` fails for long pages - `scrollToBlockInPage` has some issue with pages that are too long Now when jumping to the block, Logseq "zooms" in on it --- src/Agenda3/helpers/logseq.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Agenda3/helpers/logseq.ts b/src/Agenda3/helpers/logseq.ts index 2a71c28..0f98f62 100644 --- a/src/Agenda3/helpers/logseq.ts +++ b/src/Agenda3/helpers/logseq.ts @@ -3,7 +3,8 @@ import type { AgendaEntity } from '@/types/entity' export const navToLogseqBlock = (task: AgendaEntity, currentGraph?: { name: string }) => { const uuid = task.recurringPast ? task.id.split('_')[0] : task.id if (import.meta.env.VITE_MODE === 'plugin') { - logseq.Editor.scrollToBlockInPage(task.project.originalName, uuid) + // logseq.Editor.scrollToBlockInPage(task.project.originalName, uuid) + logseq.App.pushState('page', { name: uuid }) logseq.hideMainUI() } else { if (!currentGraph) return