fix: click on page title in query table opens it twice in file graph

fixed https://github.com/logseq/db-test/issues/395
This commit is contained in:
Tienson Qin
2025-07-31 18:19:01 +08:00
parent 9ed4cdc34d
commit 474b192027
3 changed files with 6 additions and 4 deletions

View File

@@ -709,7 +709,7 @@
All page-names are sanitized except page-name-in-block"
[state
{:keys [contents-page? whiteboard-page? other-position? show-unique-title?
on-context-menu with-parent?]
on-context-menu with-parent? stop-event-propagation?]
:or {with-parent? true}
:as config}
page-entity children label]
@@ -734,6 +734,8 @@
:on-drag-start (fn [e]
(editor-handler/block->data-transfer! page-name e true))
:on-pointer-down (fn [^js e]
(when stop-event-propagation?
(util/stop-propagation e))
(cond
(util/link? (.-target e))
nil

View File

@@ -173,7 +173,7 @@
;; string values will attempt to be rendered as pages, falling back to
;; inline-text when no page entity is found
(string? value) (if-let [page (and (string? value) (db/get-page value))]
(page-cp {} page)
(page-cp {:stop-event-propagation? true} page)
(inline-text row-block row-format value))
;; anything else should just be rendered as provided
:else value))
@@ -223,7 +223,7 @@
(state/sidebar-add-block!
(state/get-current-repo)
(:db/id row)
:block-ref)
:block)
(reset! *mouse-down? false)))}
(when (some? value)
(render-column-value {:row-block row

View File

@@ -646,7 +646,7 @@
:preview? preview?})))
(lsp-pagebar-slot)])
(when block?
(when (and block? (not sidebar?))
(component-block/breadcrumb {} repo (:block/uuid page) {}))
(when (and db-based? (ldb/library? page))