diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index 308ef8e42..54965605e 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -152,7 +152,7 @@ handle-key-down (mf/use-fn - (mf/deps set-delta apply-value update-input) + (mf/deps set-delta apply-value update-input parse-value) (fn [event] (mf/set-ref-val! dirty-ref true) (let [up? (kbd/up-arrow? event) @@ -162,19 +162,13 @@ node (mf/ref-val ref)] (when (or up? down?) (set-delta event up? down?)) + (reset! last-value* (parse-value)) (when enter? (dom/blur! node)) (when esc? (update-input value-str) (dom/blur! node))))) - handle-key-up - (mf/use-fn - (mf/deps parse-value) - (fn [] - ;; Store the last value inputed - (reset! last-value* (parse-value)))) - handle-mouse-wheel (mf/use-fn (mf/deps set-delta) @@ -231,7 +225,6 @@ (obj/set! "defaultValue" (fmt/format-number value)) (obj/set! "title" title) (obj/set! "onKeyDown" handle-key-down) - (obj/set! "onKeyUp" handle-key-up) (obj/set! "onBlur" handle-blur) (obj/set! "onFocus" handle-focus))]