Skip to content

Dragging inside modal and release outside of modal closes the modal #466

Closed
@jameskraus

Description

@jameskraus

Summary:

Dragging inside modal and release outside of modal closes the modal

Steps to reproduce:

  1. Drag something inside of a modal
  2. Release the mouse outside the modal
  3. Modal closes due to detecting a "click" outside the modal

Expected behavior:

Modal should not respond to mouse up that didn't start inside of the overlay

Link to example of issue:

https://codesandbox.io/s/mgwy6V6E

Additional notes:

I noticed this while using a draggable interface component inside of the modal. It's natural to sometimes overshoot the modal and drag onto the overlay. This results in an unexpected close of the modal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions