Skip to content

Commit

Permalink
Fix for aligned blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 18, 2021
1 parent 8c6d51d commit a1c9562
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ export default function useInsertionPoint( ref ) {

let rootClientId;
if ( ! event.target.classList.contains( 'is-root-container' ) ) {
const blockElement = event.target.classList.contains(
'wp-block'
const blockElement = !! event.target.getAttribute(
'data-block'
)
? event.target
: event.target.closest( '.wp-block' );
: event.target.closest( '[data-block]' );
rootClientId = blockElement.getAttribute( 'data-block' );
}

Expand Down

0 comments on commit a1c9562

Please sign in to comment.