Skip to content

Commit

Permalink
Block Editor: Fix the position of vertical add new block in rtl mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyssr authored Apr 21, 2021
1 parent 8c87d1c commit ded974c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ function InsertionPointPopover( {
? nextElement.getBoundingClientRect()
: null;
if ( orientation === 'vertical' ) {
if ( isRTL() ) {
return {
top: previousRect.bottom,
left: previousRect.right,
right: previousRect.left,
bottom: nextRect ? nextRect.top : previousRect.bottom,
};
}

return {
top: previousRect.bottom,
left: previousRect.left,
Expand Down

0 comments on commit ded974c

Please sign in to comment.