fix: use better option for scrolling into moving blocks

This commit is contained in:
Sebastian Bensusan
2021-07-02 17:08:30 -07:00
committed by Tienson Qin
parent 4ccc85bdde
commit 48c4616f88

View File

@@ -1658,7 +1658,7 @@
:data [block]}]
(db/refresh! repo opts)))
(when-let [block-node (util/get-first-block-by-id block-id)]
(.scrollIntoView block-node #js {:behavior "smooth" :block "center"}))))))
(.scrollIntoView block-node #js {:behavior "smooth" :block "nearest"}))))))
;; selections
(defn on-tab