From 15f43d218b838397d299134d205713870119b861 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 11 Dec 2024 09:48:40 +0000 Subject: [PATCH] Add comment by way of explanation --- .../src/components/block-list/zoom-out-separator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/block-editor/src/components/block-list/zoom-out-separator.js b/packages/block-editor/src/components/block-list/zoom-out-separator.js index 187bcd92d95e2e..86191c1e4ce32c 100644 --- a/packages/block-editor/src/components/block-list/zoom-out-separator.js +++ b/packages/block-editor/src/components/block-list/zoom-out-separator.js @@ -116,6 +116,10 @@ export function ZoomOutSeparator( { const isCurrentBlockPreviousSiblingOfBlockBeingDragged = blockBeingDraggedPreviousSiblingClientId === clientId; + // The separators are visually top/bottom of the block, but in actual fact + // the "top" separator is the "bottom" separator of the previous block. + // Therefore, this logic hides the separator if the current block is being dragged + // or if the current block is the previous sibling of the block being dragged. if ( isCurrentBlockBeingDragged || isCurrentBlockPreviousSiblingOfBlockBeingDragged