-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
ModalWrapper closing when dragging cursor out of modal #2968
Comments
Thanks for submitting. I can't reproduce what you're talking about with the given example. Here's what I did to repro; let me know if I'm missing something.
|
@dakahn Assuming that you let go of the click in the overlay affected by opacity (and not over the navbar to the left that isn't in the overlay), then yes it looks right to me, except the result in 4 is that the modal closes. As long as a click originates from inside the modal and ends outside of the modal (while within the overlay) the modal closes. |
I'm hitting this same issue with |
ill open a ticket for porting over the fixes from modal. Thanks for bringing this to our attention @ThomasMatthewFletcher |
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
ModalWrapper closes when letting go of your mouse button outside of the modal, but this is particularly troublesome if you're copying something from inside the modal by holding your mouse down, dragging across the text, and letting go outside of the modal. When you let go outside of the modal, regardless of where the click "originated" from, the modal will close.
When holding my mouse down inside the modal to select text and copy it by dragging my mouse across the screen, when I let go outside of the modal I expect the modal to stay open and my selection to remain there so I have an opportunity to copy the text. Instead, the modal closes as it detects a click outside the modal.
As a fix, I would expect there to be some form of check to ensure the click originated from and ended outside the modal before closing the modal.
This is replicated on Chrome v74.0.3729.169 on Mac OS X.
Carbon versions:
[email protected]
[email protected]
Steps to reproduce the issue
This behaviour can be seen in the ModalWrapper sample on react.carbondesignsystem.com.
The text was updated successfully, but these errors were encountered: