mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
fix: scroll to follow the moving block
This commit is contained in:
committed by
Tienson Qin
parent
8a6cbc7fe9
commit
3be517a3ea
@@ -1693,7 +1693,9 @@
|
||||
(when-let [repo (state/get-current-repo)]
|
||||
(let [opts {:key :block/change
|
||||
:data [block]}]
|
||||
(db/refresh! repo opts)))))))
|
||||
(db/refresh! repo opts)))
|
||||
(when-let [block-node (util/get-first-block-by-id block-id)]
|
||||
(.scrollIntoView block-node #js {:behavior "smooth" :block "center"}))))))
|
||||
|
||||
;; selections
|
||||
(defn on-tab
|
||||
|
||||
Reference in New Issue
Block a user