mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
fix: editing empty last block if :replace-empty-target? non-nils
Also, disable `edit-block?` for some functions
This commit is contained in:
@@ -650,7 +650,10 @@
|
||||
:keep-uuid? true
|
||||
:replace-empty-target? replace-empty-target?})
|
||||
(when edit-block?
|
||||
(js/setTimeout #(edit-block! new-block :max (:block/uuid new-block)) 10))
|
||||
(if (and replace-empty-target?
|
||||
(string/blank? (:block/content last-block)))
|
||||
(js/setTimeout #(edit-block! last-block :max (:block/uuid last-block)) 10)
|
||||
(js/setTimeout #(edit-block! new-block :max (:block/uuid new-block)) 10)))
|
||||
new-block))))))
|
||||
|
||||
(defn insert-first-page-block-if-not-exists!
|
||||
|
||||
Reference in New Issue
Block a user