mirror of https://github.com/logseq/logseq
fix: object blocks drag drop
parent
e733a104bf
commit
517a476a9f
|
@ -1669,7 +1669,13 @@
|
|||
|
||||
(defn- bullet-drag-start
|
||||
[event block uuid block-id]
|
||||
(editor-handler/highlight-block! uuid)
|
||||
(let [selected (set (map #(.-id %) (state/get-selection-blocks)))
|
||||
selected? (contains? selected block-id)]
|
||||
(when-not selected?
|
||||
(util/clear-selection!)
|
||||
(state/conj-selection-block! (gdom/getElement block-id) :down)
|
||||
(editor-handler/highlight-block! uuid)))
|
||||
|
||||
(editor-handler/block->data-transfer! uuid event)
|
||||
(.setData (gobj/get event "dataTransfer")
|
||||
"block-dom-id"
|
||||
|
|
|
@ -163,6 +163,8 @@
|
|||
(concat txs
|
||||
[(assoc page-m :block/tags (:block/tags m))
|
||||
{:db/id (:db/id block-entity)
|
||||
:block/content ""
|
||||
:block/refs []
|
||||
:block/link [:block/uuid (:block/uuid page-m)]}]
|
||||
merge-tx)))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue