diff --git a/packages/editor/src/lib/editor/Editor.ts b/packages/editor/src/lib/editor/Editor.ts index e5c144d0b44a..43e1a5031ab5 100644 --- a/packages/editor/src/lib/editor/Editor.ts +++ b/packages/editor/src/lib/editor/Editor.ts @@ -5407,7 +5407,10 @@ export class Editor extends EventEmitter { // If the shape is filled, then it's a hit. Remember, we're // starting from the TOP-MOST shape in z-index order, so any // other hits would be occluded by the shape. - return inMarginClosestToEdgeHit || shape + if (distance <= 1) { + return inMarginClosestToEdgeHit || shape + } + // Point is outside the filled shape but within margin — skip (no margin bleed) } else { // If the shape is bigger than the viewport, then skip it. if (this.getShapePageBounds(shape)!.contains(viewportPageBounds)) continue