mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: virtualized blocks selection
This commit is contained in:
@@ -1244,16 +1244,15 @@
|
||||
latest-block-id (when latest-visible-block (.-id latest-visible-block))]
|
||||
(if (and visible? (util/el-visible-in-viewport? end-block-node))
|
||||
(let [blocks (util/get-nodes-between-two-nodes start-block end-block-id "ls-block")
|
||||
direction (util/get-direction-between-two-nodes start-block end-block-id "ls-block")]
|
||||
direction (util/get-direction-between-two-nodes start-block end-block-id "ls-block")
|
||||
blocks (if (= direction :up) (reverse blocks) blocks)]
|
||||
(state/exit-editing-and-set-selected-blocks! blocks direction))
|
||||
(when latest-visible-block
|
||||
(let [blocks (util/get-nodes-between-two-nodes latest-block-id end-block-id "ls-block")
|
||||
direction (if (= latest-block-id end-block-id)
|
||||
select-direction
|
||||
(util/get-direction-between-two-nodes latest-block-id end-block-id "ls-block"))
|
||||
blocks (if (= direction :up)
|
||||
(reverse (util/sort-by-height blocks))
|
||||
(util/sort-by-height blocks))]
|
||||
blocks (if (= direction :up) (reverse (util/sort-by-height blocks)) (util/sort-by-height blocks))]
|
||||
(if append?
|
||||
(do (state/clear-edit!)
|
||||
(if (and select-direction (not= direction select-direction))
|
||||
|
||||
Reference in New Issue
Block a user