miljodir / md-components

Design-komponenter for Miljødirektoratet (CSS og React)
https://miljodir.github.io/md-components
MIT License
3 stars 2 forks source link

Fix for focus trap not attached #115

Closed kajsaeggum closed 6 months ago

kajsaeggum commented 6 months ago

Describe your changes

Experienced the MdModal-component not having focus trap enabled. This fix makes sure the useEffect that registers the eventhandler for focus trapping is run after modal is opened.

Checklist before requesting a review

github-actions[bot] commented 6 months ago

Please set a versioning label of either major, minor, or patch to the pull request.