From 2bce69f9272f9cc70c701efebb0bd91cb3245833 Mon Sep 17 00:00:00 2001 From: Luis de Dios Date: Wed, 26 Aug 2026 21:35:07 +0200 Subject: [PATCH] :bug: Fix increasing value clicking and dragging in a numeric input (#11334) --- frontend/src/app/main/ui/ds/controls/numeric_input.cljs | 9 ++++----- frontend/src/app/main/ui/ds/controls/numeric_input.scss | 4 +--- .../app/main/ui/ds/controls/utilities/input_field.scss | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/ui/ds/controls/numeric_input.cljs b/frontend/src/app/main/ui/ds/controls/numeric_input.cljs index ed7d4c4096..f04c30b849 100644 --- a/frontend/src/app/main/ui/ds/controls/numeric_input.cljs +++ b/frontend/src/app/main/ui/ds/controls/numeric_input.cljs @@ -558,10 +558,8 @@ (mf/deps disabled is-open is-multiple? ref min max nillable default is-token-applied?) (fn [event] (when-not (or disabled is-open is-multiple? is-token-applied?) - (let [node (mf/ref-val ref) - is-focused (and (some? node) (dom/active? node)) - has-token (some? (deref token-applied-name*))] - (when-not (or is-focused has-token) + (let [has-token (some? (deref token-applied-name*))] + (when-not has-token (let [client-x (.-clientX event) parsed (parse-value (str/trim (mf/ref-val raw-value*)) (mf/ref-val last-value*) min max nillable) start-val (or parsed default 0)] @@ -610,7 +608,8 @@ (mf/set-ref-val! drag-state* :idle) (dom/release-pointer event) (when-let [node (mf/ref-val ref)] - (dom/focus! node))) + (dom/focus! node) + (dom/select-text! node))) (when (= state :dragging) (mf/set-ref-val! drag-state* :idle) (dom/release-pointer event) diff --git a/frontend/src/app/main/ui/ds/controls/numeric_input.scss b/frontend/src/app/main/ui/ds/controls/numeric_input.scss index d9fb372647..98f09307b4 100644 --- a/frontend/src/app/main/ui/ds/controls/numeric_input.scss +++ b/frontend/src/app/main/ui/ds/controls/numeric_input.scss @@ -23,9 +23,7 @@ position: relative; &.resizable { - &:not(:focus-within) { - cursor: ew-resize; - } + cursor: ew-resize; } &:hover { diff --git a/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss b/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss index a295655f26..9aede7e748 100644 --- a/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss +++ b/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss @@ -96,7 +96,7 @@ } &::selection { - background: var(--color-accent-select); + background: var(--color-accent-background-select); } &::placeholder {