-
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
ComposedModal - Letting onClose called with the event object #4516
Comments
Thanks for the fix. Is it part of a new release already? |
I suppose not, but stay tuned for: https://github.com/carbon-design-system/carbon/releases |
Hi,
Currently behavior, if I press on the Cancel button of Modal footer e.target is populated. How can I distinguish between them? Am I missing something? |
Do you have a reduced case based on https://codesandbox.io/s/github/carbon-design-system/carbon/tree/master/packages/react/examples/codesandbox? |
reduced in : https://codesandbox.io/s/fragrant-morning-267l5 |
Opening https://codesandbox.io/s/fragrant-morning-267l5, clicking Import button and clicking somewhere outside, I see that modal shows something like |
I captured the screen, I don't get any div when clicking outside! |
Seems that the fix is not in |
Summary
Letting onClose called with the event object of ComposedModl, will allow to inspect event.target to detect if it's from click-outside or by clicking on the "x" button to close that modal.
Justification
Need to prevent closing Modal (ComposedModal in my case) when clicking with the mouse outside the popup screen.
Desired UX and success metrics
I need to prevent closing Modal (ComposedModal in my case) when clicking with the mouse outside the popup screen.
"Must have" functionality
Specific timeline issues / requests
Available extra resources
The text was updated successfully, but these errors were encountered: