Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-application-navigation] Prevent error when using focus trap with react intl v5 #1381

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

mjhenkes
Copy link
Contributor

@mjhenkes mjhenkes commented Mar 3, 2021

Summary

Focus trap will throw a "cannot read property 'ownerDocument' of null" when the child component isn't an html element. See: focus-trap/focus-trap-react#44 (comment)

The drawer menu is wrapped in injectIntl. In our current version it is an html element, but in react intl v5 it nolonger is an html element.

I believe this could be fixed by upgrading focus trap, but the easiest safest fix is to wrap the drawer menu in a div... which is what I have done here.

Closes #

Deployment Link

https://terra-framework-deployed-pr-#.herokuapp.com/

Testing

Additional Details

Thank you for contributing to Terra.
@cerner/terra

@mjhenkes mjhenkes self-assigned this Mar 3, 2021
@mjhenkes mjhenkes temporarily deployed to terra-framew-react-intl-fszdad March 3, 2021 22:49 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-react-intl-2sdspu March 4, 2021 14:36 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-react-intl-2sdspu March 4, 2021 15:54 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants