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}`
|
$: id = `${block.id}-${context ?? rand}`
|
||||||
$: parentId = $component?.id
|
$: parentId = $component?.id
|
||||||
$: inBuilder = $builderStore.inBuilder
|
$: inBuilder = $builderStore.inBuilder
|
||||||
|
$: blockSelected = $builderStore.selectedComponentId === block.id
|
||||||
$: instance = {
|
$: instance = {
|
||||||
...props,
|
...props,
|
||||||
_component: getComponent(type),
|
_component: getComponent(type),
|
||||||
|
@ -77,6 +78,6 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Component {instance} isBlock {onClick}>
|
<Component {instance} isBlock onClick={blockSelected ? onClick : null}>
|
||||||
<slot />
|
<slot />
|
||||||
</Component>
|
</Component>
|
||||||
|
|
Loading…
Reference in New Issue