This repository has been archived by the owner on Oct 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Modal): Focus primary actionable button on modal opening (#980)
* fix(Modal): Focus primary actionable button on modal opening * fix(ModalWrapper): Focus primary actionable button only on Modal open Set timeout to circumvent CSS transitions * refactor(Button): convert Button from class component back to stateless function * refactor(Modal): refactor DOM refs according to React best practices * refactor(Button): properly declare custom attribute * refactor(Modal): properly declare custom attribute * test(ModalWrapper): update snapshot * refactor(Modal): use `onTransitionEnd` handler over `componentDidUpdate` * test(ModalWrapper): update snapshot * refactor(Modal): query `offsetWidth` and `offsetHeight` before focusing button * refactor(Modal): reduce event handler calls * test(ModalWrapper): update snapshot * fix(Modal): rewrite conditional to remove Jest warning * refactor(Modal): rename `buttonIsFocusable` property to `beingOpen`
- Loading branch information
1 parent
74ccc0a
commit 102f805
Showing
3 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters