mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 05:04:24 +00:00
enhance(editor): scroll to the top of right sidebar when shift+click
This commit is contained in:
@@ -588,7 +588,9 @@
|
||||
(cons [repo db-id block-type block-data])
|
||||
; FIXME: No need to call `distinct`?
|
||||
(distinct))))
|
||||
(open-right-sidebar!)))
|
||||
(open-right-sidebar!)
|
||||
(when-let [elem (gdom/getElement "right-sidebar")]
|
||||
(util/scroll-to elem 0))))
|
||||
|
||||
(defn sidebar-remove-block!
|
||||
[idx]
|
||||
|
||||
@@ -336,10 +336,12 @@
|
||||
:behavior "smooth"})))))
|
||||
|
||||
(defn scroll-to
|
||||
[pos]
|
||||
(.scroll (html-node)
|
||||
#js {:top pos
|
||||
:behavior "smooth"}))
|
||||
([pos]
|
||||
(scroll-to (html-node) pos))
|
||||
([node pos]
|
||||
(.scroll node
|
||||
#js {:top pos
|
||||
:behavior "smooth"})))
|
||||
|
||||
(defn scroll-to-top
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user