xamarin/Xamarin.Forms

[Bug] Can't display element above a button in a ScrollView

Open

#7,375 opened on Sep 4, 2019

 (1 comment) (0 reactions) (0 assignees)C# (1,926 forks)batch import
4.1.0e/3 :clock3:help wantedi/regressionp/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

I have a ScrollView with a StackLayout to add a list of elements. In this list is a grid with a button and a text or an image which should lay over the button. In my concrete case I have a button to select something and a cancel image to reset the selection. This issue only appears with Xamarin Forms versions greater than 4.1.0.581479.

Steps to Reproduce

  1. Start Application
  2. Select Item in list
  3. See the issue appear

(Note if you make any change, please make sure you delete bin and obj folder.)

Expected Behavior

The Label should be above the button in all cases.

Actual Behavior

On the current version the label is below the button when the StackLayout is nested in a ScrollView

Basic Information

  • Version with issue: 4.1.0.618606 and above

  • Last known good version: 4.1.0.581479.

  • IDE: Visual Studio

  • Platform Target Frameworks:

    • iOS:
    • Android: Android 9
    • UWP:
  • Android Support Library Version:

  • Nuget Packages:

  • Affected Devices:

Screenshots

With Xamarin Forms 4.1.0.581479 it is displayed correctly as follows: image

As soon as I update to a newer version of Xamarin Forms the text is behind the button: image

Interestingly as soon as I remove the ScrollView it works again properly with the current version: image

Reproduction Link

App1.zip

Contributor guide