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.

Prevent click handler for element selection

Oleg Isonend58736b6a089
diff --git a/app/canvas/features/wrapper-component/wrapper-component.tsx b/app/canvas/features/wrapper-component/wrapper-component.tsx
index 3def6689eb..958f2f5ea2 100644
--- a/app/canvas/features/wrapper-component/wrapper-component.tsx
+++ b/app/canvas/features/wrapper-component/wrapper-component.tsx
@@ -69,6 +69,10 @@ export const WrapperComponentDev = ({
data-id={instance.id}
ref={refCallback}
onClick={(event: MouseEvent) => {
+ // Prevent click handler for element selection
+ if (isEditing) {
+ event.stopPropagation();
+ }
if (instance.component === "Link") {
event.preventDefault();
}