stipsan / react-spring-bottom-sheet

Accessible ♿️, Delightful ✨, & Fast 🚀
https://react-spring.bottom-sheet.dev/
MIT License
961 stars 132 forks source link

reach-portal element remains in DOM after modal close, blocking UI interactions #299

Open 0xLDev opened 1 month ago

0xLDev commented 1 month ago

Description

When opening a modal using the react-spring-bottom-sheet library, a reach-portal element is added to the DOM. After closing the modal, the reach-portal element does not disappear immediately, causing the UI to become unresponsive. The UI becomes interactive again only after the reach-portal element is removed from the DOM.

Steps to Reproduce

  1. Open a modal using react-spring-bottom-sheet.
  2. Close the modal.
  3. Observe that the reach-portal element remains in the DOM for some time.
  4. Notice that the UI is blocked and unresponsive until the reach-portal element disappears from the DOM.

Expected Behavior

The reach-portalelement should be removed from the DOM immediately after the modal is closed, ensuring the UI remains interactive.

Actual Behavior

The reach-portal element persists in the DOM for a few seconds after closing the modal, causing the UI to be blocked during this time.

Environment

sadside commented 1 month ago

v arhcive