From 3e2ab5f4cfc1bb1b275f4aa08b8614165f939695 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:21:16 +1000 Subject: [PATCH] Try fixing up drop indicator line positioning --- .../block-editor/src/components/list-view/drop-indicator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/list-view/drop-indicator.js b/packages/block-editor/src/components/list-view/drop-indicator.js index 1e8d51a73919ab..4ded8de24fafe5 100644 --- a/packages/block-editor/src/components/list-view/drop-indicator.js +++ b/packages/block-editor/src/components/list-view/drop-indicator.js @@ -53,7 +53,11 @@ export default function ListViewDropIndicator( { '.block-editor-block-icon' ); const rootBlockIconRect = rootBlockIconElement.getBoundingClientRect(); - return rootBlockIconRect.right - targetElementRect.left; + return ( + rootBlockIconRect.right - + targetElementRect.left - + rootBlockIconRect.width / 2 // Reduce the indentation by half the icon width. + ); }, [ rootBlockElement, targetElement ] ); const style = useMemo( () => {