diff --git a/CHANGES.md b/CHANGES.md index f9e44c799..442d3c943 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,6 +42,7 @@ ### :bug: Bugs fixed +- Avoid numeric inputs to change its value without focusing them [Taiga #3140](https://tree.taiga.io/project/penpot/issue/3140) - Fix comments modal when changing pages [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2508) - Copy paste inside a text layer leaves pasted text transparent [Taiga #3096](https://tree.taiga.io/project/penpot/issue/3096) - On dashboard enter on empty search refresh the page [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2597) diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index f927d398c..ed7f3e56c 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -237,4 +237,11 @@ #(doseq [key keys] (events/unlistenByKey key))))) + (mf/use-layout-effect + (mf/deps handle-mouse-wheel) + (fn [] + (let [keys [(events/listen (mf/ref-val ref) EventType.WHEEL handle-mouse-wheel #js {:pasive false})]] + #(doseq [key keys] + (events/unlistenByKey key))))) + [:> :input props]))