Skip to content

Commit

Permalink
Multi selection: fix intermittent e2e failure (#19865)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Jan 25, 2020
1 parent b3b92f3 commit 9a364c9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/block-editor/src/components/block-list/block-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,17 @@ function BlockPopover( {
let anchorRef = node;

if ( hasMultiSelection ) {
const bottomNode = blockNodes[ lastClientId ];

// Wait to render the popover until the bottom reference is available
// as well.
if ( ! bottomNode ) {
return null;
}

anchorRef = {
top: blockNodes[ clientId ],
bottom: blockNodes[ lastClientId ],
top: node,
bottom: bottomNode,
};
}

Expand Down

0 comments on commit 9a364c9

Please sign in to comment.