Skip to content

Commit d5b2ffc

Browse files
committed
Merge branch 'master' of github.com:Kodowa/Light-Table-Playground
2 parents 5617320 + 236f273 commit d5b2ffc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lt/objs/opener.cljs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
(when-not (empty? (dom/val me))
3232
(object/raise this :open! (dom/val me))))))
3333

34-
(defui save-input [this]
35-
[:input {:type "file" :nwsaveas true}]
34+
(defui save-input [this path]
35+
[:input {:type "file" :nwsaveas (or path true)}]
3636
:change (fn []
3737
(this-as me
3838
(when-not (empty? (dom/val me))
@@ -59,14 +59,14 @@
5959
(behavior ::transient-save
6060
:triggers #{:save :save-as-rename!}
6161
:reaction (fn [this]
62-
(let [s (save-input this)]
62+
(let [s (save-input this (files/home))]
6363
(set! active-dialog s)
6464
(dom/trigger s :click))))
6565

6666
(behavior ::save-as-rename!
6767
:triggers #{:save-as-rename!}
6868
:reaction (fn [this]
69-
(dom/trigger (save-input this) :click)))
69+
(dom/trigger (save-input this (-> @this :info :path)) :click)))
7070

7171
(behavior ::save-as
7272
:triggers #{:save-as!}

0 commit comments

Comments
 (0)