enhance(editor): scroll to the top of right sidebar when shift+click

This commit is contained in:
Tienson Qin
2020-12-20 18:20:36 +08:00
parent 04b63ad52a
commit e57d862bee
2 changed files with 9 additions and 5 deletions

View File

@@ -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]