Xamarin.forms: [Bug] Can't click Button in Xamarin.UWP for cursor offset exist

Created on 23 Jun 2020  ·  8Comments  ·  Source: xamarin/Xamarin.Forms

Description

After upgrade Xamarin Git package, Cursor of Xamarin.UWP APP runs in Windows 10 react improperly. You just cann't click Button even the cursor is just above the Button. The Button is in ScrollView.

Steps to Reproduce

  1. Before scroll, everything is OK. The color of Button changed to bright gray when Cursor hover over, and can click
    滚动前

  2. After scroll, the Button don't response to the hover of cursor, and can not click
    滚动后

  3. If you move the cursor lower to some extent,the Button response to the hover of cursor, and click is vaild
    实际位置

_Obvirouly, the offset exist._

Expected Behavior

Button response to cursor.

Actual Behavior

Button do not response to cursor properly.

Basic Information

  • Version with issue:
  • visual studio 16.6.2
  • Xamarin.Forms Version="4.7.0.968"
  • netstandard 2.0
  • TargetPlatformVersion:10.0.18362.0 - 10.0.17134.0
  • Affected Devices: window 10

Screenshots

Reproduction Link


Example code:
examplecode.txt

Workaround

button scrollview 2 regression in-progress UWP bug

Most helpful comment

Thanks we identified the issue and working for a fix ASAP

All 8 comments

Hum, something weird here, i can't reproduce, can you take a look at this sample @evolcano see what i m missing.

Thanks

Issue11106_11174.zip

Hi, @rmarinho
Thank you!
Issue11106_11174.zip is fine on my computer. The only difference which I could found is the TargetPlatformVersion of UWP Project:
1.Issue11106_11174

image

2. My example project
image

According to #11106 which samhouts mentioned before, maybe Windows 10, version 1903 (10.0; Build 18362) cause the error due to ScrollView. But the scroller is OK just one week before.

ps: my test solution

App21.zip

I also can't click buttons in UWP. Eventhandler is not fired at all as breakpoint is not hit.

I use NavigationPage, no Shell and have a Grid Layout inside a ScrollView. On a different page without ScrollView, the click event is fired and clickedhandler is called.

MinVersion: 16299/Target: 19041, XF 4.6 SR4 worked, upgraded to 4.7 and it is broken.

@MagicAndre1981 It turns out like after upgrade Xamarin, as long as you use a ScrollView and scrolled, the Y coordinate of Cursor is mis-culculated, The offset maybe relate to ScrollView scrolled.

Thanks we identified the issue and working for a fix ASAP

for me it works with 4.7 SR1

closed by #11207

Was this page helpful?
0 / 5 - 0 ratings