@@ -84,6 +84,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
84
84
private inputContainer ! : HTMLElement ;
85
85
private selectBreakpointContainer ! : HTMLElement ;
86
86
private input ! : IActiveCodeEditor ;
87
+ private selectBreakpointBox ! : SelectBox ;
87
88
private toDispose : lifecycle . IDisposable [ ] ;
88
89
private conditionInput = '' ;
89
90
private hitCountInput = '' ;
@@ -205,7 +206,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
205
206
{ text : nls . localize ( 'expression' , "Expression" ) } ,
206
207
{ text : nls . localize ( 'hitCount' , "Hit Count" ) } ,
207
208
{ text : nls . localize ( 'logMessage' , "Log Message" ) } ,
208
- { text : nls . localize ( 'triggeredBy' , "Wait For Breakpoint" ) } ,
209
+ { text : nls . localize ( 'triggeredBy' , "Wait for Breakpoint" ) } ,
209
210
] , this . context , this . contextViewService , defaultSelectBoxStyles , { ariaLabel : nls . localize ( 'breakpointType' , 'Breakpoint Type' ) } ) ;
210
211
this . selectContainer = $ ( '.breakpoint-select-container' ) ;
211
212
selectBox . render ( dom . append ( container , this . selectContainer ) ) ;
@@ -228,7 +229,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
228
229
229
230
this . updateContextInput ( ) ;
230
231
// Due to an electron bug we have to do the timeout, otherwise we do not get focus
231
- setTimeout ( ( ) => this . input . focus ( ) , 150 ) ;
232
+ setTimeout ( ( ) => this . focusInput ( ) , 150 ) ;
232
233
}
233
234
234
235
private createTriggerBreakpointInput ( container : HTMLElement ) {
@@ -256,7 +257,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
256
257
] , select ) ;
257
258
} ) ;
258
259
259
- const selectBreakpointBox = new SelectBox ( [ { text : nls . localize ( 'triggerByLoading' , 'Loading...' ) , isDisabled : true } ] , 0 , this . contextViewService , defaultSelectBoxStyles , { ariaLabel : nls . localize ( 'selectBreakpoint' , 'Select breakpoint' ) } ) ;
260
+ const selectBreakpointBox = this . selectBreakpointBox = new SelectBox ( [ { text : nls . localize ( 'triggerByLoading' , 'Loading...' ) , isDisabled : true } ] , 0 , this . contextViewService , defaultSelectBoxStyles , { ariaLabel : nls . localize ( 'selectBreakpoint' , 'Select breakpoint' ) } ) ;
260
261
selectBreakpointBox . onDidSelect ( e => {
261
262
if ( e . index === 0 ) {
262
263
this . triggeredByBreakpointInput = undefined ;
@@ -295,7 +296,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
295
296
this . setInputMode ( ) ;
296
297
const value = this . getInputValue ( this . breakpoint ) ;
297
298
this . input . getModel ( ) . setValue ( value ) ;
298
- this . input . focus ( ) ;
299
+ this . focusInput ( ) ;
299
300
}
300
301
}
301
302
@@ -455,6 +456,14 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi
455
456
this . dispose ( ) ;
456
457
}
457
458
459
+ private focusInput ( ) {
460
+ if ( this . context === Context . TRIGGER_POINT ) {
461
+ this . selectBreakpointBox . focus ( ) ;
462
+ } else {
463
+ this . input . focus ( ) ;
464
+ }
465
+ }
466
+
458
467
override dispose ( ) : void {
459
468
super . dispose ( ) ;
460
469
this . input . dispose ( ) ;
0 commit comments