Skip to content

fix: do not throw on Tab if grid has tabindex - #3838

Merged
web-padawan merged 2 commits into
masterfrom
fix/grid-tabindex
May 12, 2022
Merged

web-padawan merged 2 commits into
masterfrom
fix/grid-tabindex

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

When setting tabindex attribute on vaadin-grid, pressing Shift + Tab on it throws an error.
This is due to the fact that _predictFocusStepTarget() method returns undefined in this case.

Added a check for undefined value to not throw and not call preventDefault() so that native keyboard focus works.

Fixes vaadin/flow-components#2181

Type of change

  • Bugfix

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan
web-padawan merged commit e2bd643 into master May 12, 2022
@web-padawan
web-padawan deleted the fix/grid-tabindex branch May 12, 2022 12:54
web-padawan added a commit that referenced this pull request May 12, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request May 12, 2022
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
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.

Tab index on grid seems to break it

3 participants