Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hover tabbing behaviour #166657

Merged
merged 6 commits into from
Nov 28, 2022
Merged

Fix hover tabbing behaviour #166657

merged 6 commits into from
Nov 28, 2022

Conversation

rzhao271
Copy link
Contributor

Ref #159088

Previously, when pressing the escape key from a focused hover, the user loses the previously focused element and has to tab back to it. This PR attempts to fix that scenario by placing the focus back to the previously focused element.

@rzhao271 rzhao271 self-assigned this Nov 17, 2022
@vscodenpa vscodenpa added this to the November 2022 milestone Nov 17, 2022
@rzhao271 rzhao271 requested a review from Tyriar November 17, 2022 23:45
@rzhao271 rzhao271 changed the title Fix hover escape key focus impl Fix hover tabbing behaviour Nov 22, 2022
@rzhao271
Copy link
Contributor Author

rzhao271 commented Nov 22, 2022

Demo showing tab looping and exit focus behaviour
Screencap of the Modified elsewhere indicator in the Settings editor being focused. Pressing space opens the hover. Tabbing around goes to the various links. Pressing escape closes the hover and focuses back on the indicator.

The element focused after exiting the hover is the element that had focus before the hover was shown.

src/vs/workbench/services/hover/browser/hoverService.ts Outdated Show resolved Hide resolved
src/vs/workbench/services/hover/browser/hoverWidget.ts Outdated Show resolved Hide resolved
src/vs/workbench/services/hover/browser/hoverWidget.ts Outdated Show resolved Hide resolved
src/vs/workbench/services/hover/browser/hoverWidget.ts Outdated Show resolved Hide resolved
src/vs/workbench/services/hover/browser/hoverWidget.ts Outdated Show resolved Hide resolved
src/vs/workbench/services/hover/browser/hoverWidget.ts Outdated Show resolved Hide resolved
@rzhao271 rzhao271 requested a review from Tyriar November 22, 2022 21:27
@rzhao271 rzhao271 merged commit dbe96ec into main Nov 28, 2022
@rzhao271 rzhao271 deleted the rzhao271/sei-hover-exit-fix branch November 28, 2022 18:33
rzhao271 added a commit that referenced this pull request Nov 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants