Skip to content

Commit dcce493

Browse files
committed
microsoft#13041 - Down arrow on Search is not navigating to results
1 parent 5705851 commit dcce493

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

src/vs/workbench/parts/search/browser/searchViewlet.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,16 +488,16 @@ export class SearchViewlet extends Viewlet {
488488

489489
public focusNextInputBox(): void {
490490
if (this.searchWidget.searchInputHasFocus()) {
491-
this.searchWidget.focus(true, true);
491+
if (this.searchWidget.isReplaceShown()) {
492+
this.searchWidget.focus(true, true);
493+
} else {
494+
this.moveFocusFromSearchOrReplace();
495+
}
492496
return;
493497
}
494498

495499
if (this.searchWidget.replaceInputHasFocus()) {
496-
if (this.showsFileTypes()) {
497-
this.toggleFileTypes(true, this.showsFileTypes());
498-
} else {
499-
this.selectTreeIfNotSelected();
500-
}
500+
this.moveFocusFromSearchOrReplace();
501501
return;
502502
}
503503

@@ -513,6 +513,14 @@ export class SearchViewlet extends Viewlet {
513513
}
514514
}
515515

516+
private moveFocusFromSearchOrReplace() {
517+
if (this.showsFileTypes()) {
518+
this.toggleFileTypes(true, this.showsFileTypes());
519+
} else {
520+
this.selectTreeIfNotSelected();
521+
}
522+
}
523+
516524
public focusPreviousInputBox(): void {
517525
if (this.searchWidget.searchInputHasFocus()) {
518526
return;

0 commit comments

Comments
 (0)