                                     info (:info @this)
                                     fname (:name info)
                                     ext (when-let [e (:exts info)]
-                                          (str "." (name (first e))))
-                                    s (save-input this (files/join path (str fname ext)))]
-                                (set! active-dialog s)
-                                (dom/trigger s :click))))
+                                          (str "." (name (first e))))]
+                                (save-input this (files/join path (str fname ext))))))
 
 (behavior ::save-as-rename!
                   :triggers #{:save-as-rename!}
                   :reaction (fn [this]
-                              (dom/trigger (save-input this (-> @this :info :path)) :click)))
+                              (save-input this (-> @this :info :path))))
 
 (behavior ::save-as
                   :triggers #{:save-as!}
                   :reaction (fn [this path]
-                              (let [type (files/path->type path)
-                                    prev-tags (-> @this :info :tags)
-                                    mode (files/path->mode path)
-                                    neue-doc (doc/create {:doc (editor/get-doc this)
-                                                          :line-ending files/line-ending
-                                                          :mtime (files/stats path)
-                                                          :mime mode})]
-                                (when (:doc @this)
-                                  (object/raise (:doc @this) :close.force))
-                                (doc/register-doc neue-doc path)
-                                (object/update! this [:info] merge (path->info path))
-                                (object/merge! this {:dirty true
-                                                     :doc neue-doc})
-                                (editor/set-mode this mode)
-                                (object/remove-tags this (conj prev-tags :editor.transient))
-                                (object/add-tags this (conj (:tags type) :editor.file-backed))
-                                (object/raise this :save-as)
-                                (object/raise this :save))))
+                              (when (not (empty? path))
+                                (let [type (files/path->type path)
+                                      prev-tags (-> @this :info :tags)
+                                      mode (files/path->mode path)
+                                      neue-doc (doc/create {:doc (editor/get-doc this)
+                                                            :line-ending files/line-ending
+                                                            :mtime (files/stats path)
+                                                            :mime mode})]
+                                  (when (:doc @this)
+                                    (object/raise (:doc @this) :close.force))
+                                  (doc/register-doc neue-doc path)
+                                  (object/update! this [:info] merge (path->info path))
+                                  (object/merge! this {:dirty true
+                                                       :doc neue-doc})
+                                  (editor/set-mode this mode)
+                                  (object/remove-tags this (conj prev-tags :editor.transient))
+                                  (object/add-tags this (conj (:tags type) :editor.file-backed))
+                                  (object/raise this :save-as)
+                                  (object/raise this :save)))))
 
 (behavior ::check-read-only
                   :desc "Opener: check if file is read only"

;;**********************************************************
;; transient docs
;;**********************************************************

(def active-dialog nil)

(defui open-input [this]
  [:input {:type "file"}]

            [lt.objs.notifos :as notifos]
            [lt.objs.files :as files]
            [lt.util.dom :as dom]
            [lt.util.ipc :as ipc]
            [lt.util.cljs :refer [->dottedkw]])
  (:use [crate.binding :only [bound map-bound]])
  (:use-macros [crate.def-macros :only [defpartial]]
