-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(react): do not submit request when close button is focused #9259
Conversation
✔️ 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 |
✔️ 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 |
✔️ Deploy Preview for carbon-components-react ready! 🔨 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 |
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
Testing / Reviewing
Tested the functionality in storybook as focus is not testable using Enzyme.