Skip to content

fix(angular): update page revealed by swipe back - #31856

Open
rafaelrsi22 wants to merge 1 commit into
ionic-team:mainfrom
rafaelrsi22:fix/swipe-back-change-detection
Open

rafaelrsi22 wants to merge 1 commit into
ionic-team:mainfrom
rafaelrsi22:fix/swipe-back-change-detection

Conversation

@rafaelrsi22

Copy link
Copy Markdown

Issue number: resolves #31851


What is the current behavior?

StackController detaches a page from change detection when it is left. setActive reattaches the entering page before the transition, but startBackTransition, which the iOS swipe back gesture calls when it starts, does not. The page revealed by the swipe keeps the content it had when it was left, including state set in ionViewWillEnter, until the gesture ends.

What is the new behavior?

  • startBackTransition reattaches the entering view before the transition starts, the same way setActive does, so the revealed page is up to date from the first frame of the swipe.
  • If the swipe is abandoned, endBackTransition already runs cleanup, which detaches the view again.
  • Added a swipe-back-change-detection page to the standalone test app and an e2e test that changes state rendered by the previous page, holds the swipe halfway and checks that the revealed page shows the new value. The test fails without the fix.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Ran the full ng22 e2e suite locally (236 passed) and the swipe and back button specs on ng22-zone.

@rafaelrsi22
rafaelrsi22 requested a review from a team as a code owner December 2, 2026 03:46
@rafaelrsi22
rafaelrsi22 requested a review from thetaPC December 2, 2026 03:46
@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

@rafaelrsi22 is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the package: angular @ionic/angular package label Dec 2, 2026
@rafaelrsi22
rafaelrsi22 force-pushed the fix/swipe-back-change-detection branch from c614633 to 1658345 Compare December 2, 2026 03:51
@rafaelrsi22 rafaelrsi22 changed the title fix(angular): update the page revealed by swipe back fix(angular): update page revealed by swipe back Dec 2, 2026

This branch has not been deployed

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

Labels

package: angular @ionic/angular package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: angular, swipe back shows the previous page's stale content

1 participant