mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 05:06:10 +02:00
🐛 Remove some drop-propagation that causes strange behavior.
This commit is contained in:
parent
68e3566b8b
commit
5519cdfd7c
1 changed files with 6 additions and 9 deletions
|
@ -89,15 +89,13 @@
|
||||||
assets (dom/get-element-by-class "assets-bar")
|
assets (dom/get-element-by-class "assets-bar")
|
||||||
cpicker (dom/get-element-by-class "colorpicker-tooltip")
|
cpicker (dom/get-element-by-class "colorpicker-tooltip")
|
||||||
palette (dom/get-element-by-class "color-palette")
|
palette (dom/get-element-by-class "color-palette")
|
||||||
|
|
||||||
self (mf/ref-val self-ref)]
|
self (mf/ref-val self-ref)]
|
||||||
(if (or (and options (.contains options target))
|
(when-not (or (and options (.contains options target))
|
||||||
(and assets (.contains assets target))
|
(and assets (.contains assets target))
|
||||||
(and self (.contains self target))
|
(and self (.contains self target))
|
||||||
(and cpicker (.contains cpicker target))
|
(and cpicker (.contains cpicker target))
|
||||||
(and palette (.contains palette target))
|
(and palette (.contains palette target))
|
||||||
(= "foreignObject" (.-tagName ^js target)))
|
(= "foreignObject" (.-tagName ^js target)))
|
||||||
(dom/stop-propagation event)
|
|
||||||
(st/emit! dw/clear-edition-mode))))
|
(st/emit! dw/clear-edition-mode))))
|
||||||
|
|
||||||
on-key-up
|
on-key-up
|
||||||
|
@ -152,7 +150,6 @@
|
||||||
;; leaves the viewport or the browser itself
|
;; leaves the viewport or the browser itself
|
||||||
;; https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
|
;; https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
|
||||||
(when closest
|
(when closest
|
||||||
(dom/stop-propagation event)
|
|
||||||
(.setPointerCapture closest (.-pointerId event))))))
|
(.setPointerCapture closest (.-pointerId event))))))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue