Ver Fonte

fix: the next block might inherits block attributes from the previous block

Tienson Qin há 4 anos atrás
pai
commit
ced50c4482
1 ficheiros alterados com 2 adições e 3 exclusões
  1. 2 3
      src/main/frontend/handler/editor.cljs

+ 2 - 3
src/main/frontend/handler/editor.cljs

@@ -469,9 +469,8 @@
         current-block (wrap-parse-block current-block)
         current-block (wrap-parse-block current-block)
         new-m {:block/uuid (db/new-block-id)
         new-m {:block/uuid (db/new-block-id)
                :block/content snd-block-text}
                :block/content snd-block-text}
-        next-block (-> (merge block new-m)
-                       (dissoc :db/id :block/properties :block/pre-block? :block/meta
-                               :block/heading-level :block/type)
+        next-block (-> (merge (select-keys block [:block/parent :block/left :block/format
+                                                  :block/page :block/level :block/file :block/journal?]) new-m)
                        (wrap-parse-block))
                        (wrap-parse-block))
         {:keys [sibling? blocks]} (profile
         {:keys [sibling? blocks]} (profile
                                    "outliner insert block"
                                    "outliner insert block"