Browse Source

fix: can not write on journal page

fixes https://github.com/logseq/db-test/issues/183
Tienson Qin 1 year ago
parent
commit
ab73d4b2d3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main/frontend/components/block.cljs

+ 3 - 3
src/main/frontend/components/block.cljs

@@ -3181,8 +3181,8 @@
   (block-drag-end event *move-to'))
   (block-drag-end event *move-to'))
 
 
 (defn- block-mouse-over
 (defn- block-mouse-over
-  [e *control-show? block-id doc-mode?]
-  (when-not @*dragging?
+  [e block *control-show? block-id doc-mode?]
+  (when-not (or @*dragging? (= (:block/uuid block) (:block/uuid (state/get-edit-block))))
     (.preventDefault e)
     (.preventDefault e)
     (reset! *control-show? true)
     (reset! *control-show? true)
     (when-let [parent (gdom/getElement block-id)]
     (when-let [parent (gdom/getElement block-id)]
@@ -3407,7 +3407,7 @@
          :on-touch-cancel (fn [_e]
          :on-touch-cancel (fn [_e]
                             (block-handler/on-touch-cancel *show-left-menu? *show-right-menu?))
                             (block-handler/on-touch-cancel *show-left-menu? *show-right-menu?))
          :on-mouse-enter (fn [e]
          :on-mouse-enter (fn [e]
-                           (block-mouse-over e *control-show? block-id doc-mode?))
+                           (block-mouse-over e block *control-show? block-id doc-mode?))
          :on-mouse-leave (fn [_e]
          :on-mouse-leave (fn [_e]
                            (block-mouse-leave *control-show? block-id doc-mode?))}
                            (block-mouse-leave *control-show? block-id doc-mode?))}