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

ScrollView ScrollToAsync for x, y positions not working #12543

Closed
tekmun opened this issue Oct 20, 2020 · 6 comments · Fixed by #12721
Closed

ScrollView ScrollToAsync for x, y positions not working #12543

tekmun opened this issue Oct 20, 2020 · 6 comments · Fixed by #12721

Comments

@tekmun
Copy link

tekmun commented Oct 20, 2020

GitHub2.zip

Steps to Reproduce

  1. Run the attached program.
  2. Resize app so that the text can be scrolled.
  3. Scroll to the bottom and click the button "Click Me!".

Expected Behavior

The scrollview should scroll the text to the top (Position 0, 0)

Actual Behavior

The scrollview scrolls the text to bottom

Environment

=== Visual Studio Community 2019 for Mac ===

Version 8.7.8 (build 4)
Installation UUID: dec104fc-9532-4787-88bd-a5580ee66a6c
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000093

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.93 (2020-02/620cf538206) (64-bit)
	Package version: 612000093

=== Roslyn (Language Service) ===

3.7.0-6.20427.1+18ede13943b0bfae1b44ef078b2f3923159bcd32

=== NuGet ===

Version: 5.7.0.6702

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/3.1.402/Sdks
SDK Versions:
	3.1.402
	3.1.401
	3.1.302
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	3.1.8
	3.1.7
	3.1.6
	2.1.22
	2.1.21
	2.1.20

=== Xamarin.Profiler ===

Version: 1.6.15.68
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.0.1 (17220)
Build 12A7300

=== Xamarin.Mac ===

Version: 6.20.2.2 (Visual Studio Community)
Hash: 817b6f72a
Branch: d16-7
Build date: 2020-07-18 18:44:59-0400

=== Xamarin.iOS ===

Version: 14.0.0.0 (Visual Studio Community)
Hash: 7ec3751a1
Branch: xcode12
Build date: 2020-09-16 11:33:15-0400

=== Xamarin Designer ===

Version: 16.7.0.495
Hash: 03d50a221
Branch: remotes/origin/d16-7-vsmac
Build date: 2020-08-28 13:12:52 UTC

=== Xamarin.Android ===

Version: 11.0.2.0 (Visual Studio Community)
Commit: xamarin-android/d16-7/025fde9
Android SDK: /Users/tekmun/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		8.0 (API level 26)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 29.0.2

Build Information: 
Mono: 83105ba
Java.Interop: xamarin/java.interop/d16-7@1f3388a
ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000
SQLite: xamarin/sqlite/3.32.1@1a3276b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/tekmun/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.7.0.13
Hash: 8380518
Branch: remotes/origin/d16-7~2
Build date: 2020-09-16 05:12:24 UTC

=== Android Device Manager ===

Version: 16.7.0.24
Hash: bb090a3
Branch: remotes/origin/d16-7
Build date: 2020-09-16 05:12:46 UTC

=== Build Information ===

Release ID: 807080004
Git revision: 9ea7bef96d65cdc3f4288014a799026ccb1993bc
Build date: 2020-09-16 17:22:54-04
Build branch: release-8.7
Xamarin extensions: 9ea7bef96d65cdc3f4288014a799026ccb1993bc

=== Operating System ===

Mac OS X 10.16.0
Darwin 20.1.0 Darwin Kernel Version 20.1.0
    Wed Oct  7 21:17:40 PDT 2020
    root:xnu-7195.40.137.201.1~1/RELEASE_X86_64 x86_64

Build Logs

Example Project (If Possible)

@chamons chamons transferred this issue from xamarin/xamarin-macios Oct 20, 2020
@chamons
Copy link

chamons commented Oct 20, 2020

The sample app in question is using ScrollToAsync and the XF ScrollView View.

@tekmun
Copy link
Author

tekmun commented Oct 29, 2020

Hi,
This is the only outstanding bug in my Xamarin.Forms app ported to MacOS. Is there a timeline when this bug can be resolved? Thanks.

@tekmun
Copy link
Author

tekmun commented Oct 30, 2020

Hi,
The issue could be related to the Flipped Coordinate System on MacOS. In the sample project, the scrollview is set to scroll to origin (0,0) and it scrolls all the way to the bottom. This is because Cocoa and Core Graphics define the origin differently. One at the top left and the other at the bottom left. Thanks.

@PureWeen PureWeen added p/macOS s/unverified New report that has yet to be verified a/scrollview labels Oct 31, 2020
@tekmun
Copy link
Author

tekmun commented Nov 3, 2020

Hi,
I hope that this bug can be resolved in the next major release of Xamarin.Forms 5.0. Is there anything I can help? Or is there a workaround solution that I can implement?

@rmarinho rmarinho added e/4 🕓 4 and removed s/unverified New report that has yet to be verified labels Nov 3, 2020
@rmarinho rmarinho added e/1 🕐 1 and removed e/4 🕓 4 labels Nov 3, 2020
@rmarinho
Copy link
Member

rmarinho commented Nov 3, 2020

@tekmun yeah seems a easy fix. if you want to test the NuGet that is generated on pr #12721

@tekmun
Copy link
Author

tekmun commented Nov 4, 2020

Thanks for all the speedy hard work.

I presume that I can only test this out in the next X.F. 5.0-pre4 release. Is there a nightly build? If so, how do I download it? Thanks.

rmarinho added a commit that referenced this issue Nov 4, 2020
* [macOS] Fix ScrollTo on NSScrollView

* Update App.cs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants