From 2b5aef4215e69ca9cf39591e780cb761761866e2 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 20 Jan 2018 18:01:16 -0500 Subject: [PATCH] Scroll to top on DOM re-render --- src/looped_in/sidebar.cljs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/looped_in/sidebar.cljs b/src/looped_in/sidebar.cljs index b62d7fd..8690002 100644 --- a/src/looped_in/sidebar.cljs +++ b/src/looped_in/sidebar.cljs @@ -163,6 +163,7 @@ [$sidebar-dom] (let [$container (dom/getElement "sidebarContent")] (dom/removeChildren $container) + (.scrollTo js/window 0 0) (if (seqable? $sidebar-dom) (apply dom/append $container $sidebar-dom) (dom/append $container $sidebar-dom))))