Skip to content

Commit

Permalink
fixes #118045
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Mar 24, 2021
1 parent f9d92f0 commit e353502
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/vs/workbench/contrib/search/browser/searchView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,9 @@ export class SearchView extends ViewPane {
if (next === selected) {
this.tree.setFocus([]);
}
this.tree.setFocus([next], getSelectionKeyboardEvent(undefined, false, false));
const event = getSelectionKeyboardEvent(undefined, false, false);
this.tree.setFocus([next], event);
this.tree.setSelection([next], event);
this.tree.reveal(next);
const ariaLabel = this.treeAccessibilityProvider.getAriaLabel(next);
if (ariaLabel) { aria.alert(ariaLabel); }
Expand Down Expand Up @@ -875,7 +877,9 @@ export class SearchView extends ViewPane {
if (prev === selected) {
this.tree.setFocus([]);
}
this.tree.setFocus([prev], getSelectionKeyboardEvent(undefined, false, false));
const event = getSelectionKeyboardEvent(undefined, false, false);
this.tree.setFocus([prev], event);
this.tree.setSelection([prev], event);
this.tree.reveal(prev);
const ariaLabel = this.treeAccessibilityProvider.getAriaLabel(prev);
if (ariaLabel) { aria.alert(ariaLabel); }
Expand Down Expand Up @@ -1102,7 +1106,9 @@ export class SearchView extends ViewPane {
this.tree.domFocus();
const selection = this.tree.getSelection();
if (selection.length === 0) {
this.tree.focusNext(undefined, undefined, getSelectionKeyboardEvent());
const event = getSelectionKeyboardEvent();
this.tree.focusNext(undefined, undefined, event);
this.tree.setSelection(this.tree.getFocus(), event);
}
}
}
Expand Down

0 comments on commit e353502

Please sign in to comment.