           tags (person/tags person)
           live-tags (atom tags)                             ; contains latest local state, commit may be deferred for a while
           committer (handler (partial commit-tags-change person) 1000 live-tags)
-          adder (partial add-tag owner "focus" live-tags committer)]
+          add-tag-fn (partial add-tag owner "focus" live-tags committer)
+          clear-all-fn (partial clear-all-tags live-tags committer)]
       (dom/form {:class       "tags-gizmo"
                  :on-key-down gizmo-form-key-down
                  :on-submit   (fn [e] (.preventDefault e))}

      (committer)
      (aset node "value" ""))))

(defn handle-add-tag-key [adder e]
  (let [key (phalanges/key-set e)]
    (condp #(contains? %2 %1) key

            (dom/input {:ref         "focus"
                        :type        "text"
                        :placeholder "tag name"
                        :on-key-down (partial handle-add-tag-key add-tag-fn)})
            (dom/button {:class    "add-tag-action"
                         :on-click add-tag-fn}
              "↵")
            (dom/button {:class    "clear-all-action"
                         :on-click clear-all-fn}
              "clear all")))))))