From b1bec3344872c51b7662b333dc65da613d60a96e Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Tue, 11 Nov 2014 11:08:43 +0100 Subject: [PATCH] Make todomvc feel more responsive --- examples/todomvc/src/todomvc.cljs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/todomvc/src/todomvc.cljs b/examples/todomvc/src/todomvc.cljs index e84dcc9..cada0a8 100644 --- a/examples/todomvc/src/todomvc.cljs +++ b/examples/todomvc/src/todomvc.cljs @@ -35,10 +35,10 @@ [:input (merge props {:type "text" :value @val :on-blur save :on-change #(reset! val (-> % .-target .-value)) - :on-key-up #(case (.-which %) - 13 (save) - 27 (stop) - nil)})]))) + :on-key-down #(case (.-which %) + 13 (save) + 27 (stop) + nil)})]))) (def todo-edit (with-meta todo-input {:component-did-mount #(.focus (reagent/dom-node %))}))