From ded974c87d4223d6d220594917ac9f3ce5145838 Mon Sep 17 00:00:00 2001 From: Sunny Singh Date: Wed, 21 Apr 2021 17:23:46 +0530 Subject: [PATCH] Block Editor: Fix the position of vertical add new block in rtl mode (#31035) --- .../src/components/block-list/insertion-point.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/block-editor/src/components/block-list/insertion-point.js b/packages/block-editor/src/components/block-list/insertion-point.js index 8f26bf95dfabb0..6b7145ebb78e20 100644 --- a/packages/block-editor/src/components/block-list/insertion-point.js +++ b/packages/block-editor/src/components/block-list/insertion-point.js @@ -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,