fix: use inside-portal predicate

This commit is contained in:
Konstantinos Kaloutas
2022-10-25 19:25:16 +03:00
committed by Tienson Qin
parent 214c7c311a
commit e18905071f

View File

@@ -17,6 +17,7 @@
[frontend.handler.image :as image-handler]
[frontend.handler.notification :as notification]
[frontend.handler.page :as page-handler]
[frontend.handler.whiteboard :as whiteboard-handler]
[frontend.mixins :as mixins]
[frontend.state :as state]
[frontend.ui :as ui]
@@ -381,7 +382,7 @@
{:keys [block block-ref]} (state/sub :block-ref/context)
{:keys [page]} (state/sub :page-title/context)]
;; TODO: Find a better way to handle this on whiteboards
(when-not (.closest target ".logseq-tldraw")
(when-not (whiteboard-handler/inside-portal? target)
(cond
page
(do