You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior is actually expected due to how the modal component handles focus management by default. When the modal is open, it locks the focus to maintain accessibility—this means that interactions outside of the modal (like with toasts) can be affected.
The Nuxt UI Toast component uses the reka-ui Toast as a base. The default behavior is to only stop the countdown when the toast is hovered over or when it is in focus. Therefore, when the modal is opened the Toast cannot be focused when clicked, so the countdown does not stop.
To prevent the modal from locking focus and interfering with toast behavior, you can pass the :modal="false" prop to the component. This will disable focus trapping, and the toast dismissal countdown should work normally again after the modal is closed.
🤔 My issue is actually not 100% like this, but it was close to the behavior I am facing. I think I have to try to reproduce the "random" one. Sometimes event without clicking toast, they will not count down in combination with modals. To close them I have to focus and unfocus them.
I will close the issue for now. If i can reproduce this, I will reopen it :)
Environment
Is this bug related to Nuxt or Vue?
Nuxt
Version
3.0.2
Reproduction
https://codesandbox.io/p/devbox/white-butterfly-699yhh
Description
You can also do this programmatically by closing the modal while adding toasts.
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: