xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.64k stars 1.88k forks source link

[Bug] Editor will not scroll on Android when inside a ScrollView #15710

Open eddieyanez opened 1 year ago

eddieyanez commented 1 year ago

Description

Editor will not scroll on Android when inside a ScrollView. This is a critical issue for us because it prevents users from send large texts as they cannot edit them in the app. Users have reportedly uninstalled the app and downloaded a competitor as a result.

Steps to Reproduce

  1. Create a Xamarin forms solution e.g. Flyout App.
  2. Replace the content of the About page with:

    <Grid RowDefinitions="*,*">
    <Editor />
    
    <ScrollView Grid.Row="1">
        <Editor/>
    </ScrollView>
    </Grid>
  3. Run the app on Android
  4. Type text into both Editors with lots of new lines so that the number of lines exceed the height of the component.
  5. The bottom Editor cannot be scrolled, whereas the top editor can.

Expected Behavior

That an Editor placed inside a ScrollView on Android scrolls its text inside the component, much like on iOS.

Actual Behavior

An Editor placed inside a ScrollView on Android does not scroll its text inside the component, much like on iOS.

Basic Information

Environment

Show/Hide Visual Studio info ``` Visual Studio Enterprise 2022 for Mac Preview Version 17.6 Preview (17.6 build 402) Installation UUID: 62be46af-fed4-4e1c-a18f-f9d6fafdb800 Runtime .NET 7.0.1 (64-bit) Architecture: Arm64 Microsoft.macOS.Sdk 13.1.1007; git-rev-head:8afca776a0a96613dfb7200e0917bb57f9ed5583; git-branch:release/7.0.1xx-xcode14.2 Roslyn (Language Service) 4.5.0-3.23056.2+97881342e427ff5cdcba8f12b12ff8e6f3564431 NuGet Version: 6.4.0.117 .NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/7.0.201/Sdks SDK Versions: 7.0.201 7.0.200 7.0.103 7.0.102 7.0.101 7.0.100 6.0.406 6.0.405 6.0.404 6.0.403 6.0.402 6.0.401 6.0.400 6.0.302 6.0.301 MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET SDK (x64) SDK Versions: 5.0.408 3.1.426 3.1.425 3.1.424 3.1.423 3.1.422 3.1.421 3.1.420 .NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 7.0.3 7.0.2 7.0.1 7.0.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 .NET Runtime (x64) Runtime: /usr/local/share/dotnet/x64/dotnet Runtime Versions: 5.0.17 3.1.32 3.1.31 3.1.30 3.1.29 3.1.28 3.1.27 3.1.26 Xamarin.Profiler Version: 1.8.0.49 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode: 14.2 21534 Build: 14C18 Xamarin.Mac Version: 9.1.0.2 Visual Studio Enterprise Hash: 956a059ba Branch: xcode14.2 Build date: 2022-12-15 06:15:43-0500 Xamarin.iOS Version: 16.2.0.2 Visual Studio Enterprise Hash: 956a059ba Branch: xcode14.2 Build date: 2022-12-15 06:15:44-0500 Xamarin Designer Version: 17.6.0.17 Hash: 0180199186 Branch: remotes/origin/main Build date: 2023-02-13 22:38:37 UTC Xamarin.Android Version: 13.2.0.6 (Visual Studio Enterprise) Commit: xamarin-android/d17-5/a200af1 Android SDK: /Users/eyanez/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 12.0 (API level 31) 8.1 (API level 27) 11.0 (API level 30) 10.0 (API level 29) 13.0 (API level 33) SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 33.0.3 SDK Build Tools Version: 33.0.0 Build Information: Mono: 6dd9def Java.Interop: xamarin/java.interop/d17-5@149d70fe SQLite: xamarin/sqlite/3.40.1@68c69d8 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@9f02d77 Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.16.1 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Eclipse Temurin JDK Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk 1.8.0.302 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL Android SDK Manager Version: 17.6.0.7 Hash: 466abb5 Branch: remotes/origin/main~1 Build date: 2023-02-13 22:38:42 UTC Android Device Manager Version: 0.0.0.1246 Hash: 0dd943a Branch: main~1 Build date: 2023-02-13 22:38:42 UTC Build Information Release ID: 1706000402 Git revision: b0c291c78f94c725a2270217416e45dc810f5b26 Build date: 2023-02-13 22:36:42+00 Build branch: release-17.6 Build lane: release-17.6 Operating System Mac OS X 13.2.1 Darwin 22.3.0 Darwin Kernel Version 22.3.0 Mon Jan 30 20:38:37 PST 2023 root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64 Enabled user installed extensions Multilingual Extension 2.0.10 ```

Build Logs

Screenshots

Reproduction Link

Workaround

eddieyanez commented 1 year ago

@jfversluis, is this the right repo to report Xamarin.Forms issues or is MS no longer addressing community reported bugs? It looks like there was no interaction from the team since Jan 25 ~2 months ago.

xusan commented 7 months ago

@eddieyanez I'm also getting this issue. Were you able to find a workaround?

eddieyanez commented 6 months ago

I'm sorry @xusan, I've not seen this notification come through.

My workaround was to add an edit button on Android only that overlays the UI with a separate editor almost like a popup (but is just higher up in the Grid hierarchy outside of the scroll). I hope this helps!