diff --git a/CHANGES.md b/CHANGES.md index 819c43acf..5a8a851d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,7 @@ ### :bug: Bugs fixed +- Process numeric input changes only if the value actually changed. - Remove unnecesary redirect from history when user goes to workspace from dashboard [Taiga #1820](https://tree.taiga.io/project/penpot/issue/1820). - Fix tooltip position on view application [Taiga #1819](https://tree.taiga.io/project/penpot/issue/1819). - Fix dashboard navigation on moving file to other team [Taiga #1817](https://tree.taiga.io/project/penpot/issue/1817). diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index b1cf44c10..a6bbb02e3 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -70,11 +70,11 @@ apply-value (mf/use-callback - (mf/deps on-change update-input) + (mf/deps on-change update-input value) (fn [new-value] - (when new-value - (when on-change - (on-change new-value)) + (when (and (some? new-value) (not= new-value value) (some? on-change)) + (on-change new-value)) + (when (some? new-value) (update-input new-value)))) set-delta