Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Try to fix test failures.
  • Loading branch information
alexstine committed Mar 15, 2022
commit 14fd4ad527fc1f44b014969e7e41b3ff86bd668d
8 changes: 4 additions & 4 deletions packages/block-editor/src/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ export function isInSameBlock( a, b ) {
* its inner blocks or appender.
*/
export function isInsideRootBlock( blockElement, element ) {
if ( element.classList.contains( BLOCK_APPENDER_CLASS ) ) {
return false;
}
const parentBlock = element.closest(
[ BLOCK_SELECTOR, APPENDER_SELECTOR ].join( ',' )
);
return parentBlock === blockElement;
return (
parentBlock === blockElement &&
parentBlock.classList.contains( BLOCK_APPENDER_CLASS ) === false
);
}

/**
Expand Down