Ensure only the selected block supports clicking on inner interactive components
This commit is contained in:
parent
43663c6fbf
commit
bffa8b1f0f
|
@ -26,6 +26,7 @@
|
|||
$: id = `${block.id}-${context ?? rand}`
|
||||
$: parentId = $component?.id
|
||||
$: inBuilder = $builderStore.inBuilder
|
||||
$: blockSelected = $builderStore.selectedComponentId === block.id
|
||||
$: instance = {
|
||||
...props,
|
||||
_component: getComponent(type),
|
||||
|
@ -77,6 +78,6 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<Component {instance} isBlock {onClick}>
|
||||
<Component {instance} isBlock onClick={blockSelected ? onClick : null}>
|
||||
<slot />
|
||||
</Component>
|
||||
|
|
Loading…
Reference in New Issue