0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-08 08:09:14 -05:00

🐛 Fix problem on selection numeric inputs on Firefox

This commit is contained in:
alonso.torres 2023-03-07 17:34:50 +01:00
parent f3f611848c
commit e170011e3c
9 changed files with 36 additions and 34 deletions

View file

@ -23,6 +23,7 @@
- Allow selection of empty board by partial rect [Taiga #4806](https://tree.taiga.io/project/penpot/issue/4806)
- Improve behavior for undo on text edition [Taiga #4693](https://tree.taiga.io/project/penpot/issue/4693)
- Improve deeps selection of nested arboards [Taiga #4913](https://tree.taiga.io/project/penpot/issue/4913)
- Fix problem on selection numeric inputs on Firefox [#2991](https://github.com/penpot/penpot/issues/2991)
### :arrow_up: Deps updates

View file

@ -336,7 +336,7 @@
[:span.element-set-subtitle.wide (tr "workspace.options.interaction-delay")]
[:div.input-element {:title (tr "workspace.options.interaction-ms")}
[:> numeric-input {:ref ext-delay-ref
:on-click (select-text ext-delay-ref)
:on-focus (select-text ext-delay-ref)
:on-change change-delay
:value (:delay interaction)
:title (tr "workspace.options.interaction-ms")}]
@ -523,7 +523,7 @@
[:span.element-set-subtitle.wide (tr "workspace.options.interaction-duration")]
[:div.input-element {:title (tr "workspace.options.interaction-ms")}
[:> numeric-input {:ref ext-duration-ref
:on-click (select-text ext-duration-ref)
:on-focus (select-text ext-duration-ref)
:on-change change-duration
:value (-> interaction :animation :duration)
:title (tr "workspace.options.interaction-ms")}]

View file

@ -113,7 +113,7 @@
[:div.input-element {:title (tr "workspace.options.opacity") :class "percentail"}
[:> numeric-input {:value (-> values :opacity opacity->string)
:placeholder (tr "settings.multiple")
:on-click select-all
:on-focus select-all
:on-change handle-opacity-change
:min 0
:max 100}]]

View file

@ -266,10 +266,11 @@
[:span.icon.rotated i/auto-padding-both-sides]
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-change (partial on-change :simple :p1)
:on-focus #(select-paddings true false true false)
:on-blur #(select-paddings false false false false)
:on-blur #(do
(dom/select-target %)
(select-paddings false false false false))
:value p1}]]
[:div.padding-item.tooltip.tooltip-bottom-left
@ -277,9 +278,9 @@
[:span.icon i/auto-padding-both-sides]
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-change (partial on-change :simple :p2)
:on-focus #(select-paddings false true false true)
:on-focus #(do (dom/select-target %)
(select-paddings false true false true))
:on-blur #(select-paddings false false false false)
:value p2}]]]
@ -296,9 +297,9 @@
[:div.input-element.auto
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-change (partial on-change :multiple num)
:on-focus #(select-padding num)
:on-focus #(do (dom/select-target %)
(select-padding num))
:on-blur #(select-paddings false false false false)
:value (num (:layout-padding values))}]]])])
@ -320,7 +321,7 @@
i/auto-gap]
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click (fn [event]
:on-focus (fn [event]
(reset! gap-selected? :column-gap)
(dom/select-target event))
:on-change (partial set-gap (= :nowrap wrap-type) :column-gap)
@ -334,7 +335,7 @@
i/auto-gap]
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click (fn [event]
:on-focus (fn [event]
(reset! gap-selected? :row-gap)
(dom/select-target event))
:on-change (partial set-gap (= :nowrap wrap-type) :row-gap)

View file

@ -58,7 +58,7 @@
[:span.icon i/auto-margin-both-sides]
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-focus #(dom/select-target %)
:on-change (partial on-margin-change :simple :m1)
:value m1}]]
@ -67,7 +67,7 @@
[:span.icon.rotated i/auto-margin-both-sides]
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-focus #(dom/select-target %)
:on-change (partial on-margin-change :simple :m2)
:value m2}]]]
@ -84,7 +84,7 @@
[:div.input-element.auto
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-focus #(dom/select-target %)
:on-change (partial on-margin-change :multiple num)
:value (num (:layout-item-margin values))}]]])])
@ -231,7 +231,7 @@
i/layers
[:> numeric-input
{:placeholder "--"
:on-click #(dom/select-target %)
:on-focus #(dom/select-target %)
:on-change #(on-change-z-index %)
:value (:layout-item-z-index values)}]]]])
@ -281,7 +281,7 @@
:min 0
:data-wrap true
:placeholder "--"
:on-click #(dom/select-target %)
:on-focus #(dom/select-target %)
:on-change (partial on-size-change item)
:value (get values item)
:nillable true}]]])]]])]]))

View file

@ -316,7 +316,7 @@
[:> numeric-input {:min 0.01
:no-validate true
:placeholder "--"
:on-click select-all
:on-focus select-all
:on-change on-width-change
:disabled disabled-width-sizing?
:value (:width values)}]]
@ -325,7 +325,7 @@
[:> numeric-input {:min 0.01
:no-validate true
:placeholder "--"
:on-click select-all
:on-focus select-all
:on-change on-height-change
:disabled disabled-height-sizing?
:value (:height values)}]]
@ -345,14 +345,14 @@
[:div.input-element.Xaxis {:title (tr "workspace.options.x")}
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click select-all
:on-focus select-all
:on-change on-pos-x-change
:disabled disabled-position-x?
:value (:x values)}]]
[:div.input-element.Yaxis {:title (tr "workspace.options.y")}
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click select-all
:on-focus select-all
:disabled disabled-position-y?
:on-change on-pos-y-change
:value (:y values)}]]])
@ -368,7 +368,7 @@
:max 359
:data-wrap true
:placeholder "--"
:on-click select-all
:on-focus select-all
:on-change on-rotation-change
:value (:rotation values)}]]])
@ -396,7 +396,7 @@
{:placeholder "--"
:ref radius-input-ref
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-1-change
:value (:rx values)}]]
@ -406,7 +406,7 @@
{:type "number"
:placeholder "--"
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-multi-change
:value ""}]]
@ -416,7 +416,7 @@
[:> numeric-input
{:placeholder "--"
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-r1-change
:value (:r1 values)}]]
@ -424,7 +424,7 @@
[:> numeric-input
{:placeholder "--"
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-r2-change
:value (:r2 values)}]]
@ -432,7 +432,7 @@
[:> numeric-input
{:placeholder "--"
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-r3-change
:value (:r3 values)}]]
@ -440,7 +440,7 @@
[:> numeric-input
{:placeholder "--"
:min 0
:on-click select-all
:on-focus select-all
:on-change on-radius-r4-change
:value (:r4 values)}]]])])

View file

@ -150,7 +150,7 @@
[:> numeric-input {:ref adv-offset-x-ref
:no-validate true
:placeholder "--"
:on-click (select-text adv-offset-x-ref)
:on-focus (select-text adv-offset-x-ref)
:on-change (update-attr index :offset-x valid-number? basic-offset-x-ref)
:value (:offset-x value)}]
[:span.after (tr "workspace.options.shadow-options.offsetx")]]
@ -159,7 +159,7 @@
[:> numeric-input {:ref adv-offset-y-ref
:no-validate true
:placeholder "--"
:on-click (select-text adv-offset-y-ref)
:on-focus (select-text adv-offset-y-ref)
:on-change (update-attr index :offset-y valid-number? basic-offset-y-ref)
:value (:offset-y value)}]
[:span.after (tr "workspace.options.shadow-options.offsety")]]]
@ -169,7 +169,7 @@
[:> numeric-input {:ref adv-blur-ref
:no-validate true
:placeholder "--"
:on-click (select-text adv-blur-ref)
:on-focus (select-text adv-blur-ref)
:on-change (update-attr index :blur valid-number? basic-blur-ref)
:min 0
:value (:blur value)}]
@ -179,7 +179,7 @@
[:> numeric-input {:ref adv-spread-ref
:no-validate true
:placeholder "--"
:on-click (select-text adv-spread-ref)
:on-focus (select-text adv-spread-ref)
:on-change (update-attr index :spread valid-number?)
:value (:spread value)}]
[:span.after (tr "workspace.options.shadow-options.spread")]]]

View file

@ -196,7 +196,7 @@
""
(-> color :color uc/remove-hash))
:placeholder (tr "settings.multiple")
:on-click select-all
:on-focus select-all
:on-blur on-blur
:on-change handle-value-change}]]
@ -206,7 +206,7 @@
{:class (dom/classnames :percentail (not= (:opacity color) :multiple))}
[:> numeric-input {:value (-> color :opacity opacity->string)
:placeholder (tr "settings.multiple")
:on-click select-all
:on-focus select-all
:on-blur on-blur
:on-change handle-opacity-change
:min 0

View file

@ -100,7 +100,7 @@
:value (-> (:stroke-width stroke) width->string)
:placeholder (tr "settings.multiple")
:on-change (on-stroke-width-change index)
:on-click select-all
:on-focus select-all
:on-blur on-blur}]]
[:select#style.input-select {:value (enum->string (:stroke-alignment stroke))