Skip to content

fix(router): handle errors from view transition readiness#62535

Closed
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:fix/router-transition
Closed

fix(router): handle errors from view transition readiness#62535
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:fix/router-transition

Conversation

@arturovt
Copy link
Copy Markdown
Contributor

@arturovt arturovt commented Jul 8, 2025

This commit adds a .catch() handler to transition.ready from document.startViewTransition to prevent AbortErrors in Safari when startViewTransition is called synchronously multiple times.

Closes #62491

This commit adds a `.catch()` handler to `transition.ready` from `document.startViewTransition` to prevent `AbortError`s in Safari when `startViewTransition` is called synchronously multiple times.
@pullapprove pullapprove bot requested a review from crisbeto July 8, 2025 22:43
@ngbot ngbot bot added this to the Backlog milestone Jul 8, 2025
// complete (below), which includes the update phase of the routed components.
return createRenderPromise(injector);
});
transition.ready.catch((error) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What happens to the finished promise? Is that resolved or rejected?

Copy link
Copy Markdown
Contributor Author

@arturovt arturovt Jul 9, 2025

Choose a reason for hiding this comment

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

Checked both Chrome and Safari. the finished always resolves (never rejects), even if the ready rejects.

@atscott atscott added the target: patch This PR is targeted for the next patch release label Jul 9, 2025
@thePunderWoman thePunderWoman removed the request for review from crisbeto July 11, 2025 16:30
@thePunderWoman thePunderWoman added the action: merge The PR is ready for merge by the caretaker label Jul 11, 2025
@AndrewKushnir
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit e9f2156.

The changes were merged into the following branches: main, 20.1.x

AndrewKushnir pushed a commit that referenced this pull request Jul 14, 2025
This commit adds a `.catch()` handler to `transition.ready` from `document.startViewTransition` to prevent `AbortError`s in Safari when `startViewTransition` is called synchronously multiple times.

PR Close #62535
@arturovt arturovt deleted the fix/router-transition branch July 14, 2025 21:05
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: router target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safari aborts previous startViewTransition call

4 participants