radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.79k stars 820 forks source link

react-toast component does not resume timer after clicking close/action buttons #2268

Open alexskrilla opened 1 year ago

alexskrilla commented 1 year ago

Bug report

react-toast component does not seem to resume timer once a toast was actioned (and closed) via action or close button, which causes all subsequent toasts to be permanently stuck on a screen.

I've made a codesandbox that console logs using onPause and onResume methods to better illustrate the issue.

Current Behaviour

Kapture 2023-07-12 at 09.54.42.webm

In the video above I first trigger a toast and hover/unhover it to illustrate how timer is paused and resumed and then let it auto dismiss when it exceed the timer limit (unrelated to a bug reproduction itself, purely to show pause/resume messages)

Then I click "undo" button that triggers "pause" and never resumes, from that moment on all subsequent toasters will be permanently stuck until you manually close them.

Focusing on other elements does not help either.

Expected behaviour

Clicking toaster action/close buttons should resume the counter, so toasters in future does not start with paused state.

Reproducible example

CodeSandbox Template

joaom00 commented 1 year ago

Thanks for report! Looks like the same as #2233

dani-mp commented 1 month ago

just experienced this myself, is there a workaround while it gets fixed?