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(tab): skip elements with visibility:hidden #799

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

Dennis273
Copy link
Contributor

What:

Calling userEvent.tab focuses on element with visibility: hidden, which is not expected.

Why:
It breaks use cases related to visibility:hidden and userEvent.tab

How:

It is fixed by checking whether the target element has style visibility: hidden.

Checklist:

  • [N/A] Documentation
  • Tests
  • Ready to be merged

This PR is identical to #797 , but targeting beta

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 6, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c93f633:

Sandbox Source
userEvent-PR-template Configuration

@codecov
Copy link

codecov bot commented Dec 6, 2021

Codecov Report

Merging #799 (c93f633) into beta (ae3f07c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              beta      #799   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           77        77           
  Lines         1568      1570    +2     
  Branches       576       560   -16     
=========================================
+ Hits          1568      1570    +2     
Impacted Files Coverage Δ
src/utils/misc/isVisible.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae3f07c...c93f633. Read the comment docs.

@ph-fritsche ph-fritsche added this to the userEvent v14 milestone Dec 7, 2021
@ph-fritsche ph-fritsche merged commit a747b0a into testing-library:beta Dec 7, 2021
@github-actions
Copy link

github-actions bot commented Dec 7, 2021

🎉 This PR is included in version 14.0.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Dennis273 Dennis273 deleted the fix/tab-focusable-beta branch December 7, 2021 10:52
@Dennis273 Dennis273 mentioned this pull request Jan 12, 2022
1 task
@ph-fritsche ph-fritsche mentioned this pull request Jan 12, 2022
1 task
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.

2 participants