← 输入框|github.com|刷新
Skip to content

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

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

rafaelaugustos wants to merge 1 commit 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: the Android native job and dependency review passed. The iOS job passed its unit-test step, then stopped before native app tests because the runner had no simulator matching the requested iPhone 16 Pro (No devices found for the matching requirements). The local iPad validation above is separate from this infrastructure blocker.

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 b3d8ad7

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

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


☁️ Nx Cloud last updated this comment at 2026-10-26 04:19:51 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: b3d8ad7

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