mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Improve hover accessibility (#167749)
- Search entire hover container when adding focus trap - Change keyup to keydown event to activate hover action links properly
This commit is contained in:
@@ -72,9 +72,9 @@ export class HoverAction extends Disposable {
|
||||
actionOptions.run(this.actionContainer);
|
||||
}));
|
||||
|
||||
this._register(dom.addDisposableListener(this.actionContainer, dom.EventType.KEY_UP, e => {
|
||||
this._register(dom.addDisposableListener(this.actionContainer, dom.EventType.KEY_DOWN, e => {
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
if (event.equals(KeyCode.Enter)) {
|
||||
if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
actionOptions.run(this.actionContainer);
|
||||
|
||||
Reference in New Issue
Block a user