mirror of
https://github.com/google/blockly.git
synced 2025-12-16 14:20:10 +01:00
fix: prevent duplication of comment icon bubbles (#8053)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user