diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index 95f0ae7c1..b446920df 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -207,7 +207,7 @@ (on-focus event)) (when select-on-focus? - (dom/select-text! event) + (dom/select-text! target) ;; In webkit browsers the mouseup event will be called after the on-focus causing and unselect (.addEventListener target "mouseup" dom/prevent-default #js {:once true}))))) diff --git a/frontend/src/app/util/dom.cljs b/frontend/src/app/util/dom.cljs index 6bfe71ad5..0e670e05d 100644 --- a/frontend/src/app/util/dom.cljs +++ b/frontend/src/app/util/dom.cljs @@ -234,7 +234,7 @@ (defn select-text! [^js node] - (when (some? node) + (when (and (some? node) (some? (unchecked-get node "select"))) (.select ^js node))) (defn ^boolean equals?