Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

fix(modal): set initial focus and conditionally render focus trap #2163

Merged

Conversation

dakahn
Copy link
Contributor

@dakahn dakahn commented Apr 5, 2019

closes #2131

This is mostly @asudoh 's work, but I got it over the finish line 😉

These changes set an initial focus for the focus-trap and conditionally render the <FocusTrap> element to avoid crashes when there is no focusable elements on the modal.

@netlify
Copy link

netlify bot commented Apr 5, 2019

Deploy preview for carbon-components-react ready!

Built with commit 939a89b

https://deploy-preview-2163--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Apr 5, 2019

Deploy preview for carbon-components-react ready!

Built with commit a4cfcb8

https://deploy-preview-2163--carbon-components-react.netlify.com

Copy link
Contributor

@asudoh asudoh 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 @dakahn!

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Nice work! 👍 ✅

@tw15egan tw15egan merged commit 74e580e into carbon-design-system:master Apr 10, 2019
asmith-IBM pushed a commit to asmith-IBM/carbon-components-react that referenced this pull request Apr 18, 2019
…rbon-design-system#2163)

* fix(Modal): get focus behavior in sync with/without focus-trap

* fix(modal): remove unused focus-trap, createFocusTrap

* chore(modal): update snapshots
asudoh pushed a commit that referenced this pull request Apr 20, 2019
…2237)

* fix(Modal): fix NPE at onTransitionEnd (#2141)

Caused by `onTransitionEnd` on a child element in modal, presumably
when modal node ref hasn't been ready yet.

Fixes #2140.

* fix(modal): set initial focus and conditionally render focus trap (#2163)

* fix(Modal): get focus behavior in sync with/without focus-trap

* fix(modal): remove unused focus-trap, createFocusTrap

* chore(modal): update snapshots
@vpicone vpicone mentioned this pull request Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants