From b73d6156a52a78c8fbfcb10b99a7160104be2e7c Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Thu, 21 Nov 2024 11:28:27 -0800 Subject: [PATCH] fix: Fix bug that caused comments to be incorrectly positioned. (#8668) --- core/icons/comment_icon.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/icons/comment_icon.ts b/core/icons/comment_icon.ts index 8cdf779187..ea120ca172 100644 --- a/core/icons/comment_icon.ts +++ b/core/icons/comment_icon.ts @@ -338,8 +338,7 @@ export class CommentIcon extends Icon implements IHasBubble, ISerializable { * I.E. the block that owns this icon. */ private getBubbleOwnerRect(): Rect { - const bbox = (this.sourceBlock as BlockSvg).getSvgRoot().getBBox(); - return new Rect(bbox.y, bbox.y + bbox.height, bbox.x, bbox.x + bbox.width); + return (this.sourceBlock as BlockSvg).getBoundingRectangleWithoutChildren(); } }