Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Popover content position change to absolute throw error on canvas (#2909)

Ivan Starkov33fd11d929da
diff --git a/apps/builder/app/canvas/collapsed.ts b/apps/builder/app/canvas/collapsed.ts
index 6dca0f5303..3a5b1a0be9 100644
--- a/apps/builder/app/canvas/collapsed.ts
+++ b/apps/builder/app/canvas/collapsed.ts
@@ -184,6 +184,7 @@ const recalculate = () => {
if (element.tagName === "HTML") {
continue;
}
+
// All children are absolute or fixed
if (value === 0) {
elementsToRecalculate.push(element);
@@ -208,7 +209,8 @@ const recalculate = () => {
const elementInstanceId = element.getAttribute(idAttribute);
if (elementInstanceId === null) {
- throw new Error(`Element ${idAttribute} has no instance id`);
+ // Not a webstudio controlled element, like popover portal
+ continue;
}
const tagName = element.tagName.toLowerCase();