File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const COMMENTEDITOR_DECORATION_KEY = 'commenteditordecoration';
34
34
35
35
export class CommentThreadWidget < T extends IRange | ICellRange = IRange > extends Disposable implements ICommentThreadWidget {
36
36
private _header ! : CommentThreadHeader < T > ;
37
- private _body ! : CommentThreadBody < T > ;
37
+ private _body : CommentThreadBody < T > ;
38
38
private _commentReply ?: CommentReply < T > ;
39
39
private _additionalActions ?: CommentThreadAdditionalActions < T > ;
40
40
private _commentMenus : CommentMenus ;
@@ -274,7 +274,7 @@ export class CommentThreadWidget<T extends IRange | ICellRange = IRange> extends
274
274
}
275
275
276
276
getDimensions ( ) {
277
- return this . _body ? .getDimensions ( ) ;
277
+ return this . _body . getDimensions ( ) ;
278
278
}
279
279
280
280
layout ( widthInPixel ?: number ) {
Original file line number Diff line number Diff line change @@ -416,8 +416,12 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
416
416
this . _commentThreadWidget . submitComment ( ) ;
417
417
}
418
418
419
- _refresh ( dimensions ?: dom . Dimension ) {
420
- if ( this . _isExpanded && dimensions ) {
419
+ _refresh ( dimensions : dom . Dimension ) {
420
+ if ( dimensions . height === 0 && dimensions . width === 0 ) {
421
+ this . commentThread . collapsibleState = languages . CommentThreadCollapsibleState . Collapsed ;
422
+ return ;
423
+ }
424
+ if ( this . _isExpanded ) {
421
425
this . _commentThreadWidget . layout ( ) ;
422
426
423
427
const headHeight = Math . ceil ( this . editor . getOption ( EditorOption . lineHeight ) * 1.2 ) ;
You can’t perform that action at this time.
0 commit comments