-
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(composed-modal): don't close on mouse drag and release outside modal #18188
base: main
Are you sure you want to change the base?
fix(composed-modal): don't close on mouse drag and release outside modal #18188
Conversation
All contributors have signed the DCO. |
I have read the DCO document and I hereby sign the DCO. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
4e841e0
to
a96143b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a look at this. Looks good to me, but could you add some tests to cover this functionality?
@tay1orjones Sure, added unit tests to cover this fix. |
Closes #18187
Fixed incorrect behavior of ComposedModal closing when user clicks inside modal window, drags cursor outside and releases the mouse button in Chrome.
Changelog
Changed
event.target
node of 'onClick' event also checkevent.target
of 'onMouseDown' event, and close the modal only if both are not inside the modal window node.