|
|
@@ -246,25 +246,25 @@
|
|
|
(let [target (gobj/get e "target")
|
|
|
block-id (d/attr target "blockid")]
|
|
|
(cond
|
|
|
- (and block-id (util/uuid-string? block-id))
|
|
|
+ (state/selection?)
|
|
|
(do
|
|
|
(util/stop e)
|
|
|
(let [client-x (gobj/get e "clientX")
|
|
|
client-y (gobj/get e "clientY")
|
|
|
scroll-y (util/cur-doc-top)]
|
|
|
- (state/show-custom-context-menu! (block-context-menu-content target (cljs.core/uuid block-id)))
|
|
|
+ (state/show-custom-context-menu! (custom-context-menu-content))
|
|
|
(when-let [context-menu (d/by-id "custom-context-menu")]
|
|
|
(d/set-style! context-menu
|
|
|
:left (str client-x "px")
|
|
|
:top (str (+ scroll-y client-y) "px")))))
|
|
|
|
|
|
- (state/selection?)
|
|
|
+ (and block-id (util/uuid-string? block-id))
|
|
|
(do
|
|
|
(util/stop e)
|
|
|
(let [client-x (gobj/get e "clientX")
|
|
|
client-y (gobj/get e "clientY")
|
|
|
scroll-y (util/cur-doc-top)]
|
|
|
- (state/show-custom-context-menu! (custom-context-menu-content))
|
|
|
+ (state/show-custom-context-menu! (block-context-menu-content target (cljs.core/uuid block-id)))
|
|
|
(when-let [context-menu (d/by-id "custom-context-menu")]
|
|
|
(d/set-style! context-menu
|
|
|
:left (str client-x "px")
|