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

refactor: restore focus for popover click and focus triggers #7439

Merged
merged 4 commits into from
May 23, 2024

Conversation

web-padawan
Copy link
Member

Description

Re-enabled restoreFocusOnClose and changed the way how it is configured to work for click and focus triggers.
When using trigger = ['hover', 'focus'], the focus is still restored if opened on focus, but not if opened on hover.

Type of change

  • Refactor

@web-padawan web-padawan requested a review from vursen May 23, 2024 08:44
Copy link
Contributor

@vursen vursen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it manually and focus is only restored if the popover is set to modal.

UPD: focus doesn't get restored for a non-modal popover on close after I get into the popover with Tab.

packages/popover/src/vaadin-popover.js Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented May 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@web-padawan web-padawan merged commit 04d5d73 into main May 23, 2024
9 checks passed
@web-padawan web-padawan deleted the refactor/popover-focus-restoration branch May 23, 2024 13:22
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants