0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

🐛 Fix zooming while color picker breaks UI

This commit is contained in:
Pablo Alba 2023-05-17 13:31:02 +02:00 committed by Aitor
parent ee8f071025
commit e8b87b0db1
4 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,11 @@
# CHANGELOG # CHANGELOG
## 1.18.4
### :bug: Bugs fixed
- Fix zooming while color picker breaks UI [GH #3214](https://github.com/penpot/penpot/issues/3214)
## 1.18.3 ## 1.18.3
### :bug: Bugs fixed ### :bug: Bugs fixed

View file

@ -361,9 +361,10 @@
(fn [event] (fn [event]
(let [event (.getBrowserEvent ^js event) (let [event (.getBrowserEvent ^js event)
target (dom/get-target event) target (dom/get-target event)
mod? (kbd/mod? event)] mod? (kbd/mod? event)
picking-color? (= "pixel-overlay" (.-id target))]
(when (uwvv/inside-viewport? target) (when (or (uwvv/inside-viewport? target) picking-color?)
(dom/prevent-default event) (dom/prevent-default event)
(dom/stop-propagation event) (dom/stop-propagation event)
(let [raw-pt (dom/get-client-position event) (let [raw-pt (dom/get-client-position event)

View file

@ -183,7 +183,8 @@
[:* [:*
[:div.pixel-overlay [:div.pixel-overlay
{:tab-index 0 {:id "pixel-overlay"
:tab-index 0
:style {:cursor cur/picker} :style {:cursor cur/picker}
:on-pointer-down handle-pointer-down-picker :on-pointer-down handle-pointer-down-picker
:on-pointer-up handle-pointer-up-picker :on-pointer-up handle-pointer-up-picker

View file

@ -1 +1 @@
1.18.3 1.18.4