diff --git a/src/electron/electron/handler.cljs b/src/electron/electron/handler.cljs index 2011cfe472..d534f2da96 100644 --- a/src/electron/electron/handler.cljs +++ b/src/electron/electron/handler.cljs @@ -65,7 +65,7 @@ (vec (cons {:path (fix-win-path! path)} result)))) ;; TODO: Is it going to be slow if it's a huge directory -(defmethod handle :openDir [window _messages] +(defmethod handle :openDir [^js window _messages] (let [result (.showOpenDialogSync dialog (bean/->js {:properties ["openDirectory"]})) path (first result)] diff --git a/src/main/frontend/util.cljc b/src/main/frontend/util.cljc index 83348504c5..6a6d88f113 100644 --- a/src/main/frontend/util.cljc +++ b/src/main/frontend/util.cljc @@ -399,20 +399,20 @@ :behavior "smooth"})))))) #?(:cljs - (defn scroll-to - ([pos] - (scroll-to pos true)) - ([pos animate?] - (scroll-to (app-scroll-container-node) pos animate?)) - ([node pos animate?] - (.scroll node - #js {:top pos - :behavior (if animate? "smooth" "auto")})))) + (defn scroll-to + ([pos] + (scroll-to (app-scroll-container-node) pos)) + ([node pos] + (scroll-to node pos true)) + ([node pos animate?] + (.scroll node + #js {:top pos + :behavior (if animate? "smooth" "auto")})))) #?(:cljs (defn scroll-to-top [] - (scroll-to 0 false))) + (scroll-to (app-scroll-container-node) 0 false))) (defn url-encode [string]