react-modal-sheet
react-modal-sheet copied to clipboard
Dragging over a button that closes the modal causes TypeError: null is not an object (evaluating 'sheetRef.current.getBoundingClientRect') and breaks subsequent modals
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’s closure logic.