Skip to content

fix: do not move focus when focused in on grid via clicking #7323

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

Merged

Conversation

ugur-vaadin
Copy link
Contributor

Description

The block in the listener _onFocusin assumes that if the root target is the top/bottom of the grid, it is the result of a tab/shift-tab action. However, it is also possible that it is the result of a click. In this case, the focus should not be moved.

This PR updates the logic to move focus only if it is not caused by a click.

Fixes #2911

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Copy link

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

@ugur-vaadin ugur-vaadin removed the request for review from vursen April 12, 2024 06:44
@ugur-vaadin ugur-vaadin merged commit 5e92422 into main Apr 12, 2024
@ugur-vaadin ugur-vaadin deleted the fix-do-not-move-focus-when-focused-in-on-grid-via-clicking branch April 12, 2024 06:44
web-padawan pushed a commit that referenced this pull request Apr 12, 2024
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.alpha22 and is also targeting the upcoming stable 24.4.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.

Vaadin Grid jumps unexpectedly when using the horizontal scroll bar
3 participants