@@ -279,17 +279,13 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
279
279
this . codeActionList . value ?. layout ( height , maxWidth ) ;
280
280
281
281
// List selection
282
- this . focusedEnabledItem = 0 ;
283
- this . currSelectedItem = this . viewItems [ 0 ] . index ;
284
- this . codeActionList . value . setFocus ( [ this . currSelectedItem ] ) ;
285
-
286
-
287
- // const focusTracker = this._register(dom.trackFocus(element));
288
- // this._register(focusTracker.onDidBlur(() => {
289
- // if (dom.getActiveElement() === element || !dom.isAncestor(dom.getActiveElement(), element)) {
290
- // this.hideCodeActionWidget();
291
- // }
292
- // }));
282
+ if ( this . viewItems . length <= 1 && this . viewItems [ 0 ] . title === 'Learn more about JS/TS refactorings' ) {
283
+ this . currSelectedItem = 0 ;
284
+ } else {
285
+ this . focusedEnabledItem = 0 ;
286
+ this . currSelectedItem = this . viewItems [ 0 ] . index ;
287
+ this . codeActionList . value . setFocus ( [ this . currSelectedItem ] ) ;
288
+ }
293
289
294
290
// List Focus
295
291
this . codeActionList . value . domFocus ( ) ;
@@ -310,7 +306,7 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
310
306
protected focusPrevious ( ) {
311
307
if ( typeof this . focusedEnabledItem === 'undefined' ) {
312
308
this . focusedEnabledItem = this . viewItems [ 0 ] . index ;
313
- } else if ( this . viewItems . length <= 1 ) {
309
+ } else if ( this . viewItems . length <= 1 && this . viewItems [ 0 ] . title !== 'Learn more about JS/TS refactorings' ) {
314
310
return false ;
315
311
}
316
312
@@ -333,7 +329,7 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
333
329
protected focusNext ( ) {
334
330
if ( typeof this . focusedEnabledItem === 'undefined' ) {
335
331
this . focusedEnabledItem = this . viewItems . length - 1 ;
336
- } else if ( this . viewItems . length <= 1 ) {
332
+ } else if ( this . viewItems . length <= 1 && this . viewItems [ 0 ] . title !== 'Learn more about JS/TS refactorings' ) {
337
333
return false ;
338
334
}
339
335
0 commit comments