Skip to content

Dragging over a button that closes the modal causes TypeError: null is not an object (evaluating 'sheetRef.current.getBoundingClientRect') and breaks subsequent modals#188

Description

@sambet1997

When interacting with a button inside the modal that closes it, attempting to drag (touch and move) over this button and then releasing on the same button triggers an error:

TypeError: null is not an object (evaluating 'sheetRef.current.getBoundingClientRect')

After this error occurs, no other modals in the project can be opened. The error seems to leave the internal state of the library in an unusable state, breaking modal functionality across the entire application.

To reproduce this issue, the drag gesture must start on the button and end (release) on the same button, triggering the modal鈥檚 closure logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions