Re-focus add input on clicking add item
This commit is contained in:
parent
fcab4e9fa8
commit
6bf69abab9
2 changed files with 4 additions and 0 deletions
|
@ -267,6 +267,9 @@
|
||||||
(defn clear-new-grub-input! []
|
(defn clear-new-grub-input! []
|
||||||
(dommy/set-value! (sel1 :#add-grub-input) ""))
|
(dommy/set-value! (sel1 :#add-grub-input) ""))
|
||||||
|
|
||||||
|
(defn focus-new-grub-input! []
|
||||||
|
(.focus (sel1 :#add-grub-input)))
|
||||||
|
|
||||||
(extend-type js/HTMLDivElement
|
(extend-type js/HTMLDivElement
|
||||||
IRecipe
|
IRecipe
|
||||||
(-expand! [this]
|
(-expand! [this]
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
(dom/-show! dom/clear-all-btn)
|
(dom/-show! dom/clear-all-btn)
|
||||||
(sort-and-render-grub-list! new-grubs)
|
(sort-and-render-grub-list! new-grubs)
|
||||||
(dom/clear-new-grub-input!)
|
(dom/clear-new-grub-input!)
|
||||||
|
(dom/focus-new-grub-input!)
|
||||||
new-grubs))
|
new-grubs))
|
||||||
|
|
||||||
(defn assoc-new-grub [current new]
|
(defn assoc-new-grub [current new]
|
||||||
|
|
Loading…
Reference in a new issue