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

Update react-focus-trap dependency to latest version in terra-overlay #2280

Closed
bjankord opened this issue Mar 15, 2019 · 2 comments · Fixed by #2372
Closed

Update react-focus-trap dependency to latest version in terra-overlay #2280

bjankord opened this issue Mar 15, 2019 · 2 comments · Fixed by #2372

Comments

@bjankord
Copy link
Contributor

Issue Description

Currently we use react-focus-trap ^4.0.1
The latest version is 6.0.0

react-focus-trap changelog

@bjankord
Copy link
Contributor Author

This could potentially require a major version bump of components that consume react-focus-trap.

@bjankord
Copy link
Contributor Author

I looked into updating this a bit when working in terra-framework. When I updated to v6, I started seeing the following error when popups were opened.

Uncaught Error: You can't have a focus-trap without at least one focusable element.

A recommended work around is to use setTimeout in componentDidMount to delay focus trap activation until react renders the DOM: focus-trap/focus-trap-react#20 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants