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(react): do not submit request when close button is focused #9259

Merged
merged 6 commits into from
Jul 29, 2021
Merged

fix(react): do not submit request when close button is focused #9259

merged 6 commits into from
Jul 29, 2021

Conversation

atikenny
Copy link
Contributor

This PR changes the behavior of the Modal component when the shouldSubmitOnEnter prop is enabled. Currently, the submit handler is called even when the Close button is focused.

Changelog

Changed

  • The request submit handler is not called when one of the Close buttons is focused.

Testing / Reviewing

Tested the functionality in storybook as focus is not testable using Enzyme.

@atikenny atikenny requested a review from a team as a code owner July 23, 2021 13:33
@atikenny atikenny requested review from joshblack and dakahn July 23, 2021 13:33
@netlify
Copy link

netlify bot commented Jul 23, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: 035ff88

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61030a7fb65b580008b56fcf

😎 Browse the preview: https://deploy-preview-9259--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Jul 23, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: 035ff88

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61030a7f7bfb86000778a091

😎 Browse the preview: https://deploy-preview-9259--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Jul 23, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: 035ff88

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61030a7f87a6a50007d3defb

😎 Browse the preview: https://deploy-preview-9259--carbon-components-react.netlify.app

@kodiakhq kodiakhq bot merged commit cb71475 into carbon-design-system:main Jul 29, 2021
@atikenny atikenny deleted the modal-submit-fix branch July 30, 2021 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants