Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Fix iOS scrolling outside ScrollView bounds #14926

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Fix iOS scrolling outside ScrollView bounds #14926

merged 2 commits into from
Jan 6, 2022

Conversation

AlleSchonWeg
Copy link
Contributor

Description of Change

Perform scrolling inside the bounds of the ScrollView.

Issues Resolved

API Changes

None

Platforms Affected

  • iOS

Behavioral/Visual Changes

If scrolling to an element, which is at the end of the list and setting ScrollToPosition to Start or Center the app now bahaves same as android.

Before/After Screenshots

Before:
image
After:
image

Testing Procedure

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@@ -286,6 +286,10 @@ void OnScrollToRequested(object sender, ScrollToRequestedEventArgs e)
break;
}
}
if(newOffset.X + ScrollView.Width > ContentSize.Width)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include a sample and an UITest (tapping a Button and checking a Label value for example)?.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jsuarezruiz
i added a test. If its not enough, please modify the test.
Thank you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!. Could you rebase 5.0.0 branch to fix the conflicts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz
Conflicts fixed.

@net-foundation-cla
Copy link

net-foundation-cla bot commented Nov 26, 2021

CLA assistant check
All CLA requirements met.

@jfversluis
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AlleSchonWeg
Copy link
Contributor Author

Hi @jfversluis
I tested the nuget and with this fix scrolling behaves same as android. Is something missing in this pull request?

@jfversluis jfversluis added this to Issues in Progress in 5.0.0 SR9 (Planning) - Target Date Jan. 19th via automation Jan 6, 2022
@jfversluis
Copy link
Member

Nothing besides me merging it!

@alsed42
Copy link

alsed42 commented May 6, 2023

For me, this change introduces a new bug where calling ScrollView.ScrollToAsync has no effect on iOS anymore. Managed to restore functionality by integrating the ScrollViewRenderer's source into my project, minus the four lines added in this revision.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Bug] ScrollView ScrollToAsync behaves different on Android and iOS
4 participants