Repository navigation
[toast] Keep timers paused during overlapping interactions - #5809
Merged
Merged
Conversation
lyzno1
requested review from
atomiks,
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
September 26, 2026 06:34
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Updates toast timers so overlapping hover and focus interactions keep them paused until both end.
Changes:
- Coordinate timer resumption across hover, focus, and window-blur states.
- Add regression tests for overlapping interactions.
| File | Description |
|---|---|
packages/react/src/toast/viewport/ToastViewport.tsx |
Coordinates timer resumption across interaction states. |
packages/react/src/toast/viewport/ToastViewport.test.tsx |
Tests overlapping hover and focus behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
commit: |
Bundle size
PerformanceTotal duration: 391.76 ms -4.97 ms(-1.3%) | Renders: 76 (+0) | Paint: 704.96 ms -18.86 ms(-2.6%) No significant changes — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep timers paused when the pointer leaves a focused toast or keyboard focus leaves a hovered toast. Resume the remaining timeout after both interactions end.
Reproduction
Create a toast with an action button and a nonzero timeout. Use F6 to enter the toast viewport, focus the action button with the keyboard, and hover the toast with the pointer. Then try each case separately:
Before this fix, either case resumes the timer and allows the toast to dismiss while the other interaction is still active. The timer should stay paused until both hover and keyboard focus have left the viewport, then continue with the remaining timeout.
The regression tests cover both interaction orders and verify that the remaining timeout resumes after both interactions end.