Explorar el Código

fix: block reference gets lost on alt-dragged blocks after re-index

close #2313
Tienson Qin hace 4 años
padre
commit
86661c2001
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/main/frontend/handler/dnd.cljs

+ 3 - 0
src/main/frontend/handler/dnd.cljs

@@ -42,6 +42,9 @@
     (cond
       alt-key?
       (do
+        (editor-handler/set-block-property! (:block/uuid current-block)
+                                            :id
+                                            (str (:block/uuid current-block)))
         (editor-handler/api-insert-new-block!
          (util/format "((%s))" (str (:block/uuid current-block)))
          {:block-uuid (:block/uuid target-block)