mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-22 21:06:40 +08:00
🐛 Fix group context menu opening in block settings
This commit is contained in:
parent
e928987623
commit
abc1b8aa63
@ -298,30 +298,33 @@ export const BlockNode = ({
|
||||
</ContextMenu.Root>
|
||||
)}
|
||||
/>
|
||||
{hasSettingsPopover(block) && (
|
||||
<SettingsPopoverContent
|
||||
node={block}
|
||||
groupId={groupId}
|
||||
onNodeChange={handleBlockUpdate}
|
||||
side="left"
|
||||
isExpanded={isSettingsPopoverExpanded}
|
||||
onExpandClick={() =>
|
||||
setIsSettingsPopoverExpanded(!isSettingsPopoverExpanded)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{typebot && isMediaBubbleBlock(block) && (
|
||||
<MediaBubblePopoverContent
|
||||
uploadFileProps={{
|
||||
workspaceId: typebot.workspaceId,
|
||||
typebotId: typebot.id,
|
||||
blockId: block.id,
|
||||
}}
|
||||
block={block}
|
||||
side="left"
|
||||
onContentChange={handleContentChange}
|
||||
/>
|
||||
)}
|
||||
{/* Prevent triggering parent group context menu */}
|
||||
<div onContextMenu={(e) => e.stopPropagation()}>
|
||||
{hasSettingsPopover(block) && (
|
||||
<SettingsPopoverContent
|
||||
node={block}
|
||||
groupId={groupId}
|
||||
onNodeChange={handleBlockUpdate}
|
||||
side="left"
|
||||
isExpanded={isSettingsPopoverExpanded}
|
||||
onExpandClick={() =>
|
||||
setIsSettingsPopoverExpanded(!isSettingsPopoverExpanded)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{typebot && isMediaBubbleBlock(block) && (
|
||||
<MediaBubblePopoverContent
|
||||
uploadFileProps={{
|
||||
workspaceId: typebot.workspaceId,
|
||||
typebotId: typebot.id,
|
||||
blockId: block.id,
|
||||
}}
|
||||
block={block}
|
||||
side="left"
|
||||
onContentChange={handleContentChange}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Popover.Root>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user