@@ -211,6 +211,10 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
211
211
212
212
this . _bodyElement = < HTMLDivElement > dom . $ ( '.body' ) ;
213
213
container . appendChild ( this . _bodyElement ) ;
214
+
215
+ dom . addDisposableListener ( this . _bodyElement , dom . EventType . FOCUS_IN , e => {
216
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
217
+ } ) ;
214
218
}
215
219
216
220
protected _fillHead ( container : HTMLElement ) : void {
@@ -265,6 +269,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
265
269
} else {
266
270
const deleteCommand = ( this . _commentThread as modes . CommentThread2 ) . deleteCommand ;
267
271
if ( deleteCommand ) {
272
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
268
273
return this . commandService . executeCommand ( deleteCommand . id , ...( deleteCommand . arguments || [ ] ) ) ;
269
274
} else if ( this . _commentEditor . getValue ( ) === '' ) {
270
275
this . commentService . disposeCommentThread ( this . _owner , this . _commentThread . threadId ! ) ;
@@ -516,6 +521,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
516
521
uri : this . _commentEditor . getModel ( ) ! . uri ,
517
522
value : this . _commentEditor . getValue ( )
518
523
} ;
524
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
519
525
} ) ) ;
520
526
521
527
this . _commentThreadDisposables . push ( this . _commentEditor . getModel ( ) ! . onDidChangeContent ( ( ) => {
@@ -526,6 +532,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
526
532
newInput . value = modelContent ;
527
533
thread . input = newInput ;
528
534
}
535
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
529
536
} ) ) ;
530
537
531
538
this . _commentThreadDisposables . push ( ( this . _commentThread as modes . CommentThread2 ) . onDidChangeInput ( input => {
@@ -727,6 +734,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
727
734
uri : this . _commentEditor . getModel ( ) ! . uri ,
728
735
value : this . _commentEditor . getValue ( )
729
736
} ;
737
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
730
738
await this . commandService . executeCommand ( acceptInputCommand . id , ...( acceptInputCommand . arguments || [ ] ) ) ;
731
739
} ) ) ;
732
740
@@ -751,6 +759,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
751
759
uri : this . _commentEditor . getModel ( ) ! . uri ,
752
760
value : this . _commentEditor . getValue ( )
753
761
} ;
762
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
754
763
await this . commandService . executeCommand ( command . id , ...( command . arguments || [ ] ) ) ;
755
764
} ) ) ;
756
765
} ) ;
@@ -821,6 +830,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
821
830
uri : this . _commentEditor . getModel ( ) ! . uri ,
822
831
value : this . _commentEditor . getValue ( )
823
832
} ;
833
+ this . commentService . setActiveCommentThread ( this . _commentThread ) ;
824
834
let commandId = commentThread . acceptInputCommand . id ;
825
835
let args = commentThread . acceptInputCommand . arguments || [ ] ;
826
836
0 commit comments