Skip to content

[iOS] ScrollView.ScrollToAsync(x, y, animated) doesn't work when called from Page.OnAppearing #31177

Description

@kubaflo

Description

When calling ScrollView.ScrollToAsync(x, y, animated) from within Page.OnAppearing on iOS, the scroll action is not performed. The call completes without error, but the ScrollView remains at its initial position. This behavior occurs only on iOS — Android scrolls as expected.

<Grid RowDefinitions="*,*">
    <ScrollView Grid.Row="1"
                x:Name="scrollView">
        <VerticalStackLayout>
            <Label Text="This is a scroll view scrolled to y pos"
                    HeightRequest="500"/>
            <Label AutomationId="successLabel"
                    Text="Success if visible"/>
        </VerticalStackLayout>
    </ScrollView>
</Grid>
protected override async void OnAppearing()
{
	await scrollView.ScrollToAsync(0, 600, true);
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions