⚡ Sangsakala Proxy 🏠 Home
Skip to content

fix(ios): preserve native content Back for default Frame navigation - #11590

Open
rafaelaugustos wants to merge 2 commits into
NativeScript:mainfrom
rafaelaugustos:fix/ios-default-navigation-content-pop
Open

rafaelaugustos wants to merge 2 commits into
NativeScript:mainfrom
rafaelaugustos:fix/ios-default-navigation-content-pop

Conversation

@rafaelaugustos

@rafaelaugustos rafaelaugustos commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Checklist

What is the current behavior?

Default Frame navigation always installs a delegate exposing the optional custom animation callback. On iPadOS 26, that prevents native content-pop input beside an inset navigation area, even when the callback returns nil. A plain UIKit control at the same inset accepts the gesture; exposing only that callback reproduces the failure. Full-width screen-edge Back still works with Core's existing gesture policy.

What is the new behavior?

Use a delegate with only didShow for navigation without a configured animated transition. Keep the existing animation/interaction callbacks on a separate NSObject delegate for configured transitions. Store the selected delegate on each Page's controller so the existing Page lifecycle restores it after Back. Both delegates share the unchanged didShow bookkeeping; no gesture delegate or recognition rule is replaced.

Clear stale transition metadata when a reused Page is navigated with default animation, and release both shared delegate references when the last Frame is disposed. No public API or declaration changes are required. Android uses fragment transitions and has no corresponding UIKit delegate path.

Fixes #11589.

Validation

  • Four regressions fail on the original implementation; all six new unit cases pass with the correction.
  • Full npx nx run core:test --skip-nx-cache: 571 passed, 1 skipped, 45 files passed.
  • Core build and Nx formatting passed.
  • Real iPad Pro 11-inch M4 simulators: iPadOS 26.0 inset content now pops by gesture; full-width controls pass on 18.6 and 26.0. The iPadOS 18.6 inset screen-edge limitation remains unchanged.
  • On both OS versions, the new apps/automated regression ran in an isolated consumer using the same test/helper execution bodies. It verifies the native selector surface and restoration across default → fade → default → Back → Back. The complete iOS apps/automated app suite was not run.
  • Native input on both OS versions verified an actual UIKit-reported cancellation with the typed draft and Page identity retained, five committed native returns, and restored delegates after fade, slide, a custom transition instance and a shared transition. Both instrumented transition instances received push and pop callbacks; final native/logical history returned to Root.
  • The original drawer rotation probe on iPadOS 26 now exercises 10 cases, 0 gestures not reproduced. Landscape-to-portrait Back both commits and cancels under real input while retaining the expected identities/history. UIKit deferred rotation for those swipes; one programmatic Back recorded same-coordinator overlap. This is not a universal overlap guarantee.

The native consumer uses Core 9.1.3 with only this PR's built ui/frame/index.ios.js substituted, iOS runtime 9.1.0 and Xcode 27.0. No other unpublished Core patch is used. Physical iPad, Stage Manager and newer OS versions were not tested.

Native validation sources, commands, hashes and logs. The published baseline and standalone UIKit isolation remain available in vue-router-ns #170.

CI status (2026-10-30, head c5f591a, after merging current main): the unit-test step, Android native job, dependency review and preview publication passed. The current iOS job is stuck in Start iOS Simulator (started 02:33 UTC); the native iOS test step has not started. The same simulator workflow passed for #11587 in the adjacent run. The contributor cannot cancel the stuck upstream run (GitHub returned HTTP 403); a maintainer restart is requested. The earlier run failed simulator selection before native tests. The local iPad validation above remains separate from hosted native acceptance.

Video

Actual iPadOS 26 simulator recording with the correction: editing a draft, cancelling content Back, committing Back, then navigating through fade, slide, a custom instance and a shared transition. The content stays inset 280 points; returning from each default page restores the custom delegate before the next Back.

core-native-content-back.mp4

@nx-cloud

nx-cloud Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c5f591a

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 11s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 8s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-30 02:37:37 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11590
npm i https://pkg.pr.new/@nativescript/vite@11590
npm i https://pkg.pr.new/@nativescript/webpack@11590

commit: c5f591a

@rafaelaugustos

Copy link
Copy Markdown
Author

The fix is ready for review, with the native regression/video evidence above. After updating the branch with main, the unit tests and Android native suite passed on c5f591a.

Could a maintainer cancel and rerun the stuck iOS workflow? It has been in Start iOS Simulator since 02:33 UTC, before any native iOS test. The adjacent #11587 run used the same workflow and completed successfully; its simulator startup took six seconds. I tried cancelling this run to retry, but GitHub returned HTTP 403 because this account lacks upstream Actions permissions.

No test assertion or simulator requirement has been weakened. #11589 now links this implementation and distinguishes the published baseline from the candidate fix.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS 26] Inset Frame cannot start native content Back with default navigation

1 participant