Merge pull request #197156 from microsoft/merogge/status-bar-hover

show tooltip on keyboard focus of status bar item
This commit is contained in:
Megan Rogge 2023-11-01 10:31:21 -07:00 committed by GitHub
commit 98417b150a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,7 @@ export class StatusbarEntryItem extends Disposable {
this.container.appendChild(this.beakContainer);
this.update(entry);
addDisposableListener(this.labelContainer, EventType.FOCUS, () => this.hover?.show(false));
}
update(entry: IStatusbarEntry): void {
@ -138,6 +139,10 @@ export class StatusbarEntryItem extends Disposable {
EventHelper.stop(e);
this.executeCommand(command);
} else if (event.equals(KeyCode.Escape) || event.equals(KeyCode.LeftArrow) || event.equals(KeyCode.RightArrow)) {
EventHelper.stop(e);
this.hover?.hide();
}
});