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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tab): Keep focus on the document if there are no enabled, focusable elements #238

Merged

Conversation

ryanismaking
Copy link
Contributor

@ryanismaking ryanismaking commented Mar 20, 2020

Hi @Gpx and @kentcdodds. 馃憢

I ran into an issue where tab() blows up if the case under test has not rendered any elements which are focusable. Probably a bit of a corner case, but it would be nice to have it covered.

Hope the change is okay. This is my first open-source contribution! 馃槄

@ryanismaking ryanismaking changed the title Keep focus on the document if there are no enabled, focusable elements fix(tab): Keep focus on the document if there are no enabled, focusable elements Mar 20, 2020
@codecov
Copy link

codecov bot commented Mar 20, 2020

Codecov Report

Merging #238 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #238      +/-   ##
==========================================
+ Coverage   98.61%   98.63%   +0.02%     
==========================================
  Files           1        1              
  Lines         144      147       +3     
  Branches       41       42       +1     
==========================================
+ Hits          142      145       +3     
  Misses          2        2              
Impacted Files Coverage 螖
src/index.js 98.63% <100.00%> (+0.02%) 猬嗭笍

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 38e3c22...420ae03. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you

@benmonro
Copy link
Member

@kentcdodds @Gpx can we get this merged?

Copy link
Member

@benmonro benmonro left a comment

Choose a reason for hiding this comment

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

LGTM Thanks for adding this!

@alexkrolick alexkrolick merged commit 1af6706 into testing-library:master Mar 27, 2020
@Gpx
Copy link
Member

Gpx commented Mar 27, 2020

馃帀 This PR is included in version 10.0.1 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

@Gpx Gpx added the released label Mar 27, 2020
@ryanismaking ryanismaking deleted the fix-tab-no-focusable-elements branch March 29, 2020 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants