From ea2e74d26610e476f37d04a78857ef05b54dbea6 Mon Sep 17 00:00:00 2001 From: charlie Date: Tue, 26 Nov 2024 17:21:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20URL=20Property=20type=20=E2=80=94=20?= =?UTF-8?q?Link=20is=20not=20clickable=20https://github.com/logseq/db-test?= =?UTF-8?q?/issues/172?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/frontend/components/page.cljs | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/frontend/components/page.cljs b/src/main/frontend/components/page.cljs index 60bbc0e51ef..b2cca5b3cc1 100644 --- a/src/main/frontend/components/page.cljs +++ b/src/main/frontend/components/page.cljs @@ -473,23 +473,24 @@ (state/set-state! :page-title/context {:page (:block/title page) :page-entity page}))) :on-click (fn [e] - (when-not (= (.-nodeName (.-target e)) "INPUT") - (.preventDefault e) - (when (gobj/get e "shiftKey") - (state/sidebar-add-block! - (state/get-current-repo) - (:db/id page) - :page))))} + (when-not (some-> e (.-target) (.closest ".ls-properties-area")) + (when-not (= (.-nodeName (.-target e)) "INPUT") + (.preventDefault e) + (when (gobj/get e "shiftKey") + (state/sidebar-add-block! + (state/get-current-repo) + (:db/id page) + :page)))))} [:div.w-full.relative (component-block/block-container - {:page-title? true - :page-title-actions-cp (when (and with-actions? (not= (:db/id (state/get-edit-block)) (:db/id page))) db-page-title-actions) - :hide-title? sidebar? - :sidebar? sidebar? - :hide-children? true - :container-id container-id - :from-journals? (contains? #{:home :all-journals} (get-in (state/get-route-match) [:data :name]))} + {:page-title? true + :page-title-actions-cp (when (and with-actions? (not= (:db/id (state/get-edit-block)) (:db/id page))) db-page-title-actions) + :hide-title? sidebar? + :sidebar? sidebar? + :hide-children? true + :container-id container-id + :from-journals? (contains? #{:home :all-journals} (get-in (state/get-route-match) [:data :name]))} page)]])) (defn- page-mouse-over