Merge pull request #7767 from penpot/alotor-fix-problem-compatibility
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled

🐛 Fix problem with tainted canvas in thumbnails
This commit is contained in:
Alejandro Alonso
2025-11-18 14:15:06 +01:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -38,5 +38,8 @@
(some? position-data)
[:> svg/text-shape props]
(or (nil? position-data) is-component?)
;; Only use this for component preview, otherwise the dashboard thumbnails
;; will give a tainted canvas error because the `foreignObject` cannot be
;; rendered.
(and (nil? position-data) is-component?)
[:> fo/text-shape props])))

View File

@@ -22,6 +22,7 @@
[app.main.data.workspace.path.shortcuts :as psc]
[app.main.data.workspace.shortcuts :as wsc]
[app.main.data.workspace.text.shortcuts :as tsc]
[app.main.features :as features]
[app.main.store :as st]
[app.main.streams :as ms]
[app.main.ui.hooks :as hooks]
@@ -313,7 +314,8 @@
(filter #(or (root-frame-with-data? %)
(and (cfh/group-shape? objects %)
(not (contains? child-parent? %)))
(and (cfh/text-shape? objects %)
(and (features/active-feature? @st/state "render-wasm/v1")
(cfh/text-shape? objects %)
(not (wasm.api/intersect-position % @last-point-ref)))))))
remove-measure-xf