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

Use more robust method of getting dialog element #220

Merged
merged 2 commits into from Oct 20, 2017

Conversation

taion
Copy link
Member

@taion taion commented Oct 20, 2017

Note base branch.

Mostly fixes react-bootstrap/react-bootstrap#2600
Ref https://github.com/react-bootstrap/react-overlays/pull/208/files#r142582319

Sorry for the random formatting changes on the tests. Got carried away.

Perhaps we should still check for .hasAttribute on dialogElement, though – in the case where it's e.g. a text node, the dialog element will just be a string and thus won't have that method.

@taion taion requested a review from jquense October 20, 2017 00:24

it('should not attempt to focus nonexistent children', () => {
const Dialog = () => null;
Copy link
Member Author

Choose a reason for hiding this comment

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

The old logic found some weird container <div> (maybe from a transition or something?) as the dialog element, instead of picking up on there not being any dialog element.

@jquense jquense merged commit 5b10575 into test-flakiness Oct 20, 2017
@taion taion deleted the dialogElement branch October 20, 2017 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants