Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { useSelect, useDispatch } from '@wordpress/data';
import { isInsideRootBlock } from '../../utils/dom';
import useMovingAnimation from './moving-animation';
import { Context, BlockNodes } from './root-container';
import { BlockContext } from './block';
import { BlockListBlockContext } from './block';
import ELEMENTS from './block-elements';

const BlockComponent = forwardRef(
Expand All @@ -50,7 +50,7 @@ const BlockComponent = forwardRef(
mode,
blockTitle,
wrapperProps,
} = useContext( BlockContext );
} = useContext( BlockListBlockContext );
const { initialPosition } = useSelect(
( select ) => {
if ( ! isSelected ) {
Expand Down
6 changes: 3 additions & 3 deletions packages/block-editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import BlockCrashBoundary from './block-crash-boundary';
import BlockHtml from './block-html';
import { Block } from './block-wrapper';

export const BlockContext = createContext();
export const BlockListBlockContext = createContext();

function BlockListBlock( {
mode,
Expand Down Expand Up @@ -167,7 +167,7 @@ function BlockListBlock( {
const memoizedValue = useMemo( () => value, Object.values( value ) );

return (
<BlockContext.Provider value={ memoizedValue }>
<BlockListBlockContext.Provider value={ memoizedValue }>
<BlockCrashBoundary onError={ onBlockError }>
{ isValid && lightBlockWrapper && (
<>
Expand Down Expand Up @@ -199,7 +199,7 @@ function BlockListBlock( {
<BlockCrashWarning />
</Block.div>
) }
</BlockContext.Provider>
</BlockListBlockContext.Provider>
);
}

Expand Down