Skip to content

Commit

Permalink
Improve inserter position
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 22, 2022
1 parent 3b08836 commit c95cb08
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -74,9 +74,7 @@ function BlockPopoverInbetween( {

if ( isVertical ) {
return {
width: previousElement
? previousElement.offsetWidth
: nextElement.offsetWidth,
width: previousRect ? previousRect.width : nextRect.width,
height:
nextRect && previousRect
? nextRect.top - previousRect.bottom
Expand All @@ -93,9 +91,7 @@ function BlockPopoverInbetween( {

return {
width,
height: previousElement
? previousElement.offsetHeight
: nextElement.offsetHeight,
height: previousRect ? previousRect.height : nextRect.height,
};
}, [ previousElement, nextElement, isVertical, positionRecompute ] );

Expand Down Expand Up @@ -183,6 +179,7 @@ function BlockPopoverInbetween( {
'block-editor-block-popover',
props.className
) }
__unstableForcePosition
>
<div
className="block-editor-block-popover__inbetween-container"
Expand Down

0 comments on commit c95cb08

Please sign in to comment.