diff --git a/pxtblocks/plugins/comments/bubble.ts b/pxtblocks/plugins/comments/bubble.ts index d416cdfe38e..7974372bfa7 100644 --- a/pxtblocks/plugins/comments/bubble.ts +++ b/pxtblocks/plugins/comments/bubble.ts @@ -79,7 +79,7 @@ export abstract class Bubble implements Blockly.IDeletable { public readonly workspace: Blockly.WorkspaceSvg, protected anchor: Blockly.utils.Coordinate, protected ownerRect?: Blockly.utils.Rect, - protected headerText?: string, + protected readonly headerText?: string, ) { this.id = Blockly.utils.idGenerator.getNextUniqueId(); this.svgRoot = dom.createSvgElement( @@ -168,6 +168,15 @@ export abstract class Bubble implements Blockly.IDeletable { this.onMouseDown, ); + if (this.header) { + Blockly.browserEvents.conditionalBind( + this.header, + 'pointerdown', + this, + this.onMouseDown, + ); + } + Blockly.browserEvents.conditionalBind( this.collapseIcon, 'pointerdown', @@ -761,5 +770,6 @@ Blockly.Css.register(` .blocklyText.bubbleHeaderText { font-weight: bold; + cursor: grab; } `); diff --git a/pxtblocks/plugins/comments/textinput_bubble.ts b/pxtblocks/plugins/comments/textinput_bubble.ts index 405dd05236a..b64392ea541 100644 --- a/pxtblocks/plugins/comments/textinput_bubble.ts +++ b/pxtblocks/plugins/comments/textinput_bubble.ts @@ -68,7 +68,7 @@ export class TextInputBubble extends Bubble { protected ownerRect?: Blockly.utils.Rect, protected readonly readOnly?: boolean, protected readonly additionalClasses?: string[], - protected headerText?: string, + protected readonly headerText?: string, ) { super(workspace, anchor, ownerRect, headerText); dom.addClass(this.svgRoot, 'blocklyTextInputBubble');