Fix toggling comments when there's not range provider (#276463)

This commit is contained in:
Alex Ross
2025-11-10 12:32:28 +01:00
committed by GitHub
parent 3683ef9900
commit 614751be45
@@ -1084,7 +1084,7 @@ export class CommentController implements IEditorContribution {
}
private onEditorMouseDown(e: IEditorMouseEvent): void {
this.mouseDownInfo = this._activeEditorHasCommentingRange.get() ? parseMouseDownInfoFromEvent(e) : null;
this.mouseDownInfo = (e.target.element?.className.indexOf('comment-range-glyph') ?? -1) >= 0 ? parseMouseDownInfoFromEvent(e) : null;
}
private onEditorMouseUp(e: IEditorMouseEvent): void {