fix: prevent duplication of comment icon bubbles (#8053)

This commit is contained in:
Richard Knoll
2024-05-02 08:38:40 -07:00
committed by GitHub
parent 19fa49101a
commit 4861c7d98a

View File

@@ -264,15 +264,18 @@ export class CommentIcon extends Icon implements IHasBubble, ISerializable {
}
async setBubbleVisible(visible: boolean): Promise<void> {
if (visible && (this.textBubble || this.textInputBubble)) return;
if (!visible && !(this.textBubble || this.textInputBubble)) return;
if (this.bubbleVisiblity === visible) return;
this.bubbleVisiblity = visible;
if (!this.sourceBlock.rendered || this.sourceBlock.isInFlyout) return;
await renderManagement.finishQueuedRenders();
if (
!this.sourceBlock.rendered ||
this.sourceBlock.isInFlyout ||
this.sourceBlock.isInsertionMarker()
)
return;
if (visible) {
if (this.sourceBlock.isEditable()) {
this.showEditableBubble();