Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix modals in react (#11714) #11862

Merged
merged 1 commit into from
May 17, 2017

Conversation

stacey-gammon
Copy link
Contributor

  • fix focused button not being set

Need to do it in a timeout because ng-react hasn’t loaded the react
code yet, so it can’t find the buttons.

  • add a test

that would have caught the issue, and also change the default focused
button for the listing delete page since it’s a destructive action.

  • Add a comment

  • Push focusing of default button into react code

  • Push ESC key handling into react as well

  • Remove ESC tests in angular form

They don’t pass, I’m guessing because of the way it’s triggered, but
these test cases should now be handled in jest. Also confirmed it
works as expected with the modal.

  • Address code review comments

  • Use autoFocus

backports #11714

* fix focused button not being set

Need to do it in a timeout because ng-react hasn’t loaded the react
code yet, so it can’t find the buttons.

* add a test

that would have caught the issue, and also change the default focused
button for the listing delete page since it’s a destructive action.

* Add a comment

* Push focusing of default button into react code

* Push ESC key handling into react as well

* Remove ESC tests in angular form

They don’t pass, I’m guessing because of the way it’s triggered, but
these test cases should now be handled in jest.  Also confirmed it
works as expected with the modal.

* Address code review comments

* Use autoFocus
@stacey-gammon stacey-gammon merged commit 4da3357 into elastic:5.x May 17, 2017
@stacey-gammon stacey-gammon deleted the 5-x-fix-react-modals branch October 24, 2017 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant