mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 20:54:09 +00:00
fix: disable backspace from the start and delete in the end for query
This commit is contained in:
@@ -2693,7 +2693,10 @@
|
||||
(delete-and-update input selected-start selected-end)
|
||||
|
||||
(and end? current-block)
|
||||
(delete-concat current-block)
|
||||
(let [editor-state (get-state)
|
||||
custom-query? (get-in editor-state [:config :custom-query?])]
|
||||
(when-not custom-query?
|
||||
(delete-concat current-block)))
|
||||
|
||||
:else
|
||||
(delete-and-update input current-pos (inc current-pos))))))
|
||||
@@ -2723,11 +2726,13 @@
|
||||
(delete-and-update input selected-start selected-end))
|
||||
|
||||
(zero? current-pos)
|
||||
(do
|
||||
(let [editor-state (get-state)
|
||||
custom-query? (get-in editor-state [:config :custom-query?])]
|
||||
(util/stop e)
|
||||
(when (and (if top-block? (string/blank? value) true)
|
||||
(not root-block?)
|
||||
(not single-block?))
|
||||
(not single-block?)
|
||||
(not custom-query?))
|
||||
(delete-block! repo false)))
|
||||
|
||||
(and (> current-pos 1)
|
||||
|
||||
Reference in New Issue
Block a user