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

[Bug] ScrollView UWP bug in 4.7.0.968! #11106

Closed
mohitatray opened this issue Jun 18, 2020 · 18 comments
Closed

[Bug] ScrollView UWP bug in 4.7.0.968! #11106

mohitatray opened this issue Jun 18, 2020 · 18 comments
Assignees
Labels
4.7.0 regression on 4.7.0 a/scrollview i/regression in-progress This issue has an associated pull request that may resolve it! m/high impact ⬛ p/UWP t/bug 🐛
Milestone

Comments

@mohitatray
Copy link

Description

I recently upgraded my NuGet package from Xamarin.Forms 4.6.0.967 to 4.7.0.968. Microsoft.UI.Xaml package also got upgraded in the process (the issue may be due to Microsoft.UI.Xaml package upgrade). I was working on a UWP and WPF app. I have some Entry, DatePicker and Picker elements inside a FlexLayout in ScrollView. Before the update, it was working fine but when I updated Xamarin.Forms, the scroll view is not working as expected.

When I scroll down and click an entry, the entry is not focused. Some entry above it is focused. It looks like when I scroll down, the actual view scrolls down but the pointer events are not passed to the view at the current position. Instead pointer events are passed to the upper views as if scroll position in ScrollView is not changed (0).

Steps to Reproduce

  1. Create a Xamarin.Forms project and add UWP platform.
  2. Make sure you have Xamarin.Forms 4.7.0.968 NuGet package installed in all projects.
  3. Add a ScrollView and a StackLayout (or FlexLayout) inside it.
  4. Add a lot of Entry elements in the StackLayout such that you need to significantly scroll down to reach the end entry.
  5. Run the UWP app and scroll down and try to click on the bottom entry.

Expected Behavior

The Entry clicked should get focus.

Actual Behavior

Nothing happens or sometimes the Entry somewhere above the clicked entry gets focus.

Basic Information

  • Version with issue: Xamarin.Forms 4.7.0.968
  • Last known good version: Xamarin.Forms 4.6.0.967
  • IDE: Visual Studio Community
  • Platform Target Frameworks: Problem only in UWP. Nothing wrong in WPF.
  • Nuget Packages: Xamarin.Forms, Microsoft.UI.Xaml (in UWP)
@mohitatray mohitatray added s/unverified New report that has yet to be verified t/bug 🐛 labels Jun 18, 2020
@samhouts samhouts added 4.7.0 regression on 4.7.0 a/scrollview p/UWP labels Jun 18, 2020
@samhouts samhouts added this to the 4.7.0 milestone Jun 18, 2020
@activa
Copy link
Contributor

activa commented Jun 18, 2020

I can confirm. Every ScrollView on UWP is now broken.

@pitMobile
Copy link

Confirm. We have the same problem on UWP.

@jsuarezruiz
Copy link
Contributor

I have created a repro sample using a ScrollView with a StackLayout inside and a good number of Entries.

Issue11106.zip

I'm testing but can't reproduce the wrong behavior:

issue11106

Using Xamarin.Forms 4.7.0.968. @mohitatray Could you take a look to the sample?

@rmarinho rmarinho self-assigned this Jun 23, 2020
@rmarinho rmarinho added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Jun 23, 2020
@rmarinho
Copy link
Member

@mohitatray @activa @pitMobile can you try the sample above to see if we can get a reproduction , i also tried and seems to be working fine the focus.

@mohitatray
Copy link
Author

Hi @jsuarezruiz,
I ran your sample. It doesn't work fine in my PC. Same issue occurs as I mentioned in my post above (after scrolling down, the entry clicked doesn't get focus the entry somewhere above gets focus).
Steps I followed -

  1. Downloaded your sample and opened solution in Visual Studio.
  2. I was offered to install Android SDK (as it is not installed), I clicked "cancel".
  3. I deleted Android and IOS projects.
  4. My UWP project didn't load so I right-clicked it and clicked "Reload Project".
  5. I got a dialog saying "The project below requires a platform SDK that is either not installed or included as part of a future update to Visual Studio." (screenshot below). I clicked "Ok" to change platform SDK target to 'Windows 10, version 1903 (10.0; Build 18362)' as you can see in the screenshot below.

Capture

  1. My UWP project loaded. I selected UWP project as my startup project and run the app.
  2. Same issue occurs as I mentioned in my post above (after scrolling down, the entry clicked doesn't get focus the entry somewhere above gets focus).

Try running your sample targeting newer platform SDK 'Windows 10, version 1903 (10.0; Build 18362)'. That's the only difference I can see between the sample running on your PC and my PC.
Bdw which software did you use for recording screen?

@jsuarezruiz
Copy link
Contributor

@mohitatray Thanks for the detailed feedback. Now I can reproduce the issue.

@samhouts samhouts removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/unverified New report that has yet to be verified labels Jun 23, 2020
@JKennedy24
Copy link

Yep also seeing this bug on UWP

@AnnieMonk
Copy link

This has been an issue for me too, I downgraded the version of Xamarin.Forms so I can work normally.

@AnnieMonk
Copy link

This is my form that doesn't work properly with the 4.0.6.968 version of Xamarin.Forms

https://github.com/AnnieMonk/getFood_API/blob/master/getFood.Mobile/getFood.Mobile/Views/InfoNarudzbaPage.xaml

@rmarinho
Copy link
Member

Thanks , we identified the issue and working on a fix for it asap.

@rmarinho
Copy link
Member

#11174 is related

@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Jun 25, 2020
@EmilAlipiev
Copy link
Contributor

EmilAlipiev commented Jun 26, 2020

I have 2 horizontal Listview using SfListview on my app and In uwp when I click one other one is selected. even sometimes randomly selecting another button, item in the view. it is probably related to this.

@johnshardman
Copy link

Forced to upgrade to 4.7 due to issue with pickers inside ScrollView. Having upgraded to 4.7, every ScrollView is now broken. This is a critical bug that needs fixing asap. Don't really want to downgrade to 4.4 or below, but it looks like I might have to. As three point releases in a row (4-5 - 4.7) all break on UWP with issues around ScrollView.

@mahop-net
Copy link

I have the same problem. Downgrading is solving it...

By the way: On lower versions I still have the problem, that if I scroll down and than click or tab on an area without controls, the scrollview is scrolling all the way up again ... same happens with pickers.

@activa
Copy link
Contributor

activa commented Jun 30, 2020

@Hopfenspirger That's a bug that has been around for ages. See #10420

@EmilAlipiev
Copy link
Contributor

@activa oh ok this is maybe different issue but there is bigger issue with scrollviews and listviews in general with 4.7 independent from entry.

@samhouts
Copy link
Member

samhouts commented Jul 1, 2020

closed by #11207

@mdbill
Copy link

mdbill commented Jul 2, 2020

upgrading to 4.7.0.1080 worked for me...so far.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.7.0 regression on 4.7.0 a/scrollview i/regression in-progress This issue has an associated pull request that may resolve it! m/high impact ⬛ p/UWP t/bug 🐛
Projects
None yet
Development

No branches or pull requests