mirror of
https://github.com/penpot/penpot.git
synced 2025-03-16 01:31:22 -05: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")
|
||||
cpicker (dom/get-element-by-class "colorpicker-tooltip")
|
||||
palette (dom/get-element-by-class "color-palette")
|
||||
|
||||
self (mf/ref-val self-ref)]
|
||||
(if (or (and options (.contains options target))
|
||||
(and assets (.contains assets target))
|
||||
(and self (.contains self target))
|
||||
(and cpicker (.contains cpicker target))
|
||||
(and palette (.contains palette target))
|
||||
(= "foreignObject" (.-tagName ^js target)))
|
||||
(dom/stop-propagation event)
|
||||
(when-not (or (and options (.contains options target))
|
||||
(and assets (.contains assets target))
|
||||
(and self (.contains self target))
|
||||
(and cpicker (.contains cpicker target))
|
||||
(and palette (.contains palette target))
|
||||
(= "foreignObject" (.-tagName ^js target)))
|
||||
(st/emit! dw/clear-edition-mode))))
|
||||
|
||||
on-key-up
|
||||
|
@ -152,7 +150,6 @@
|
|||
;; leaves the viewport or the browser itself
|
||||
;; https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
|
||||
(when closest
|
||||
(dom/stop-propagation event)
|
||||
(.setPointerCapture closest (.-pointerId event))))))
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue