diff --git a/packages/block-editor/src/components/block-tools/block-toolbar-popover.js b/packages/block-editor/src/components/block-tools/block-toolbar-popover.js index f97a4fa3b2555c..fb8267b23b399e 100644 --- a/packages/block-editor/src/components/block-tools/block-toolbar-popover.js +++ b/packages/block-editor/src/components/block-tools/block-toolbar-popover.js @@ -47,15 +47,19 @@ export default function BlockToolbarPopover( { isToolbarForced.current = false; } ); + // If the block has a parent with __experimentalCaptureToolbars enabled, + // the toolbar should be positioned over the topmost capturing parent. + const clientIdToPositionOver = capturingClientId || clientId; + const popoverProps = useBlockToolbarPopoverProps( { contentElement: __unstableContentRef?.current, - clientId: capturingClientId || clientId, + clientId: clientIdToPositionOver, } ); return ( ! isTyping && (