Paged ScrollView loses page alignment when resized on iOS 27

A paged ScrollView loses its page when the window is resized on iPadOS 27:

ScrollView(.horizontal) {
    HStack(spacing: 0) {
        ForEach(pages) { page in
            PageView(page).containerRelativeFrame(.horizontal)
        }
    }
    .scrollTargetLayout()
}
.scrollTargetBehavior(.paging)
.scrollPosition(id: $selection)

Expected: the selected page stays edge-aligned after the resize (as TabView(.page) does).

Actual:

  • The content offset is preserved in points, not pages — the view rests between pages.
  • scrollPosition(id:) writes nil during the resize, so the selection can't be recovered from the binding.
  • Both .paging and .viewAligned are affected.

Repro project (broken ScrollView, TabView control, and workaround side by side, with live instrumentation): https://github.com/katebrr/PagedScrollResizeLab

Why not TabView(.page): it has no API for scroll position/progress observation (our analytics depend on it), inter-page spacing, partial-width peeking pages, or pausing the swipe mid-gesture.

Workaround (Workaround/View+ScrollPositionResize.swift in the repo): restore the last non-nil selection via scrollTo one Task.yield() after the resize. Works, but lands a frame late and relies on undocumented behavior.

Questions:

  1. Is this behavior intended, or a bug?
  2. Is there a supported way to keep a paged ScrollView anchored to its page across resizes?
  3. Is there a more robust formulation than scrollTo after Task.yield()?

Filed as FB24688033.

Hello, I am having the same issue. If this is not a bug, what API is recommended to keep the position after resizing ?

@katebrr Thanks for filing a bug.

You can see the status of your feedback in Feedback Assistant. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label "Resolution." We're unable to share any updates on specific reports on the forums.

For more details on when you'll see updates to your report, please see What to expect after submission.

Albert  WWDR

Hey! I have the same issue, what we are supposed to do?

@Namsco Is it the same issue the first developer filed a bug? Can you describe? Can you reproduce? Please read my post and if you can reproduce and provide a simple focused project, post it here.

If you're not familiar with preparing a test project, take a look at Creating a test project.

Albert  WWDR

Paged ScrollView loses page alignment when resized on iOS 27
 
 
Q