diff --git a/frontend/src/app/main/ui/shapes/text.cljs b/frontend/src/app/main/ui/shapes/text.cljs index 0b1d47e602..b54af2fc8e 100644 --- a/frontend/src/app/main/ui/shapes/text.cljs +++ b/frontend/src/app/main/ui/shapes/text.cljs @@ -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]))) diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 190e05700e..650a3fe730 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -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