Skip to content

Catch AbortError rejections from overlapping toast view transitions#10341

Open
Prajwalraut29 wants to merge 1 commit into
adobe:mainfrom
Prajwalraut29:main
Open

Catch AbortError rejections from overlapping toast view transitions#10341
Prajwalraut29 wants to merge 1 commit into
adobe:mainfrom
Prajwalraut29:main

Conversation

@Prajwalraut29

Copy link
Copy Markdown

Fixes #10337

When overlapping toasts trigger back-to-back document.startViewTransition() calls, the skipped/preempted transition rejects its promises with AbortError: Transition was skipped. The starter templates and v1 ToastContainer only caught .ready (v1) or nothing at all (starters), resulting in unhandled promise rejections.

This fix adds .catch(() => {}) on all three ViewTransition promises (finished, ready, updateCallbackDone) in all three locations:

  • starters/docs/src/Toast.tsx
  • starters/tailwind/src/Toast.tsx
  • packages/@adobe/react-spectrum/src/toast/ToastContainer.tsx

@github-actions github-actions Bot added the Toast label Jul 19, 2026
@Prajwalraut29

Copy link
Copy Markdown
Author

hey @devongovett, check my PR

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a test? We have a browser suite that can be run with yarn test:browser
It'd be good to prove that this will fix the issue you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toast docs wrapUpdate example produces unhandled AbortError rejections when toasts overlap

2 participants