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

Bug: Dragging (selecting text) from inside dialog to outside of dialog causes dialog to close #59

Closed
leerobert opened this issue Jun 25, 2023 · 3 comments

Comments

@leerobert
Copy link

leerobert commented Jun 25, 2023

Expected behavior: dragging inside of a dialog and having the drag selection end outside of the dialog should not cause the dialog to close.

@CaptainCodeman
Copy link
Owner

Can you explain it a bit more and / or post a reproduction e.g. stackblitz

The original post mentioned a click handler outside of the dialog (?)

@leerobert
Copy link
Author

leerobert commented Jun 25, 2023

Hi @CaptainCodeman

Here's a simple video reproducing the issue:

https://www.loom.com/share/3f20275cb0194a448e868fdfdc502016

In dialog boxes, you don't expect dragging outside of the element's box to cause the dialog to close. Probably needs a check on onClickOutside to ensure the click outside isn't part of a drag event.

@leerobert leerobert changed the title Bug: Dragging (selecting text) from inside modal to outside of modal causes modal to close Bug: Dragging (selecting text) from inside dialog to outside of dialog causes dialog to close Jun 25, 2023
@leerobert
Copy link
Author

leerobert commented Jun 25, 2023

Nice work @CaptainCodeman 👍🏼. Mind publishing under 0.0.18?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants