Skip to content

TabView (.page style) selection binding jumps back to previous page on Android #401

@marcprux

Description

@marcprux

Discussed in https://github.com/orgs/skiptools/discussions/670

Originally posted by shirelzz April 21, 2026
I'm experiencing an issue with TabView when using a selection binding together with .tabViewStyle(.page) on Android.

When switching from the second page (index 1) back to the first page (index 0), the view briefly changes but then immediately jumps back to the second page. This makes it impossible to navigate backward. This happens only when switching from index 1 to 0, swiping between 1 and 2 indexes works as expected.

Code example:

TabView(selection: $page) {
    page1.tag(mode.menu)
    page2.tag(mode.content)
    page3.tag(mode.related)
}
.tabViewStyle(.page(indexDisplayMode: .never))

When I remove the selection binding, swipe gestures between pages work correctly and feel stable. However, I lose the ability to programmatically change the current page (e.g., when tapping buttons inside each page), since the TabView is no longer controlled by state.

Are there any recommended workarounds for a stable paging behavior?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions