Have SHIFT+TAB clear focus in the list (#179221)

Fixes https://github.com/microsoft/vscode/issues/101183
This commit is contained in:
Tyler James Leonhardt
2023-04-04 19:53:55 -07:00
committed by GitHub
parent 000b98845a
commit 7a1e910d68
@@ -1405,8 +1405,10 @@ export class QuickInputController extends Disposable {
}
const stops = container.querySelectorAll<HTMLElement>(selectors.join(', '));
if (event.shiftKey && event.target === stops[0]) {
// Clear the focus from the list in order to allow
// screen readers to read operations in the input box.
dom.EventHelper.stop(e, true);
stops[stops.length - 1].focus();
list.clearFocus();
} else if (!event.shiftKey && event.target === stops[stops.length - 1]) {
dom.EventHelper.stop(e, true);
stops[0].focus();