mirror of
https://github.com/penpot/penpot.git
synced 2025-07-08 19:17:19 +02:00
🐛 Fix bug in firefox when a text box is inside a mask
This commit is contained in:
parent
d2d506dbf0
commit
ad18604552
2 changed files with 19 additions and 8 deletions
|
@ -27,21 +27,31 @@
|
|||
[(first childs) (rest childs)]
|
||||
[nil childs])
|
||||
|
||||
;; We need to separate mask and clip into two because a bug in Firefox
|
||||
;; breaks when the group has clip+mask+foreignObject
|
||||
;; Clip and mask separated will work in every platform
|
||||
; Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1734805
|
||||
[clip-wrapper clip-props]
|
||||
(if masked-group?
|
||||
["g" (-> (obj/new)
|
||||
(obj/set! "clipPath" (clip-url render-id mask)))]
|
||||
[mf/Fragment nil])
|
||||
|
||||
[mask-wrapper mask-props]
|
||||
(if masked-group?
|
||||
["g" (-> (obj/new)
|
||||
(obj/set! "clipPath" (clip-url render-id mask))
|
||||
(obj/set! "mask" (mask-url render-id mask)))]
|
||||
[mf/Fragment nil])]
|
||||
|
||||
[:> mask-wrapper mask-props
|
||||
(when masked-group?
|
||||
[:> render-mask #js {:frame frame :mask mask}])
|
||||
[:> clip-wrapper clip-props
|
||||
[:> mask-wrapper mask-props
|
||||
(when masked-group?
|
||||
[:> render-mask #js {:frame frame :mask mask}])
|
||||
|
||||
(for [item childs]
|
||||
[:& shape-wrapper {:frame frame
|
||||
:shape item
|
||||
:key (:id item)}])]))))
|
||||
(for [item childs]
|
||||
[:& shape-wrapper {:frame frame
|
||||
:shape item
|
||||
:key (:id item)}])]]))))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue