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] onOutsideClick fires when dragging from inside #57

Open
mtmacdonald opened this issue Jan 8, 2021 · 0 comments
Open

[BUG] onOutsideClick fires when dragging from inside #57

mtmacdonald opened this issue Jan 8, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@mtmacdonald
Copy link
Contributor

Describe the bug

When you click inside a popover, then drag the mouse outside the popover and release the mouse, then onOutsideClick fires (meaning the popover then closes in my case). We have popovers with forms where users click and drag while copying values. They reported it being annoying that the popover closes when they try to do this.

Not sure if this is a bug, the intended behaviour, or an unavoidable behaviour. We are aware that we can avoid onOutsideClick closing the popover in this situation, but would like to know if that's the best or only resolution.

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to this story
  2. Open the popover
  3. Click mouse down over text
  4. Drag mouse to highlight text, but continue to drag outside the border of the popover
  5. Release mouse outside the popover
  6. Popover closes

Expected behavior

onOutsideClick fires and popover closes only when the click is initiated outside the layer, but doesn't close when mousedown is inside the layer but mouseup is outside the layer.

Screenshots

Browser / OS (please complete the following information):

Tested on Chrome and Firefox on OS X. We saw one small browser difference in our test story: in Chrome it's always reproducable. In Firefox, if you select text in the input and then drag mouse outside popover, in that case it doesn't close the popover in Firefox.

Additional context
We are tracking this in ticket #92

@mtmacdonald mtmacdonald added the bug Something isn't working label Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant