Skip to content

Commit

Permalink
ReviewZoneWidget makes duplicate calls to show() + hide() (#176641
Browse files Browse the repository at this point in the history
)

Fixes #174263
  • Loading branch information
alexr00 authored Mar 9, 2023
1 parent 30728d7 commit 61c8c7c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,6 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
toggleExpand() {
if (this._isExpanded) {
this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Collapsed;
this.hide();
if (!this._commentThread.comments || !this._commentThread.comments.length) {
this.deleteCommentThread();
}
} else {
this._commentThread.collapsibleState = languages.CommentThreadCollapsibleState.Expanded;
}
Expand Down Expand Up @@ -468,6 +464,10 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
if (this.editor.hasWidgetFocus()) {
this.editor.focus();
}

if (!this._commentThread.comments || !this._commentThread.comments.length) {
this.deleteCommentThread();
}
}
super.hide();
}
Expand Down

0 comments on commit 61c8c7c

Please sign in to comment.