Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollView.ScrollToAsync doesn't work when called from Page.OnAppearing #26781

Open
Mark-NC001 opened this issue Dec 23, 2024 · 1 comment · May be fixed by #26796
Open

ScrollView.ScrollToAsync doesn't work when called from Page.OnAppearing #26781

Mark-NC001 opened this issue Dec 23, 2024 · 1 comment · May be fixed by #26796
Assignees
Labels
area-controls-scrollview ScrollView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@Mark-NC001
Copy link

Mark-NC001 commented Dec 23, 2024

Description

I have a page that runs ScrollToAsync on a ScrollView in OnAppearing, but that doesn't appear to do anything, the control passed in still remains not seen at the bottom of the screen.

Steps to Reproduce

See the app in the linked repository:

Run the app.

You will see a button (ButtonTop) at the top of the screen with a caption "Jump to Bottom" Lots of labels filling up the rest of the screen, and if you scroll down, you'll see another button called BottomButton with text "Jump to Top".

If you examine the code, you'll see that in OnAppearing, when it runs for the first time, it should scroll to BottomButton, ensuring it is visible. That code executes, but does not seem to have any effect on the display.

Link to public reproduction project repository

https://github.com/Mark-NC001/ScrollToControl

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

No response

Affected platforms

Windows, Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

@Mark-NC001 Mark-NC001 added the t/bug Something isn't working label Dec 23, 2024
@kubaflo kubaflo added platform/android 🤖 platform/iOS 🍎 area-controls-scrollview ScrollView s/verified Verified / Reproducible Issue ready for Engineering Triage labels Dec 24, 2024
@kubaflo kubaflo self-assigned this Dec 24, 2024
@Ying-6
Copy link

Ying-6 commented Dec 24, 2024

This issue has been verified using Visual Studio 17.13.0 Preview 2.1 (9.0.21 &9.0.14 & 8.0.100). Can repro this issue on Windows and Android platform.

@Ying-6 Ying-6 added s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-scrollview ScrollView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants