This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 44096 - Controls still participate in hit testing when inside a Grid, StackLayout, and ContentView that has IsEnabled = false
Summary: Controls still participate in hit testing when inside a Grid, StackLayout, an...
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 53445 54462 58969 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-08 06:22 UTC by adrianknight89
Modified: 2017-08-23 18:09 UTC (History)
13 users (show)

See Also:
Tags: ac, bug, android, uwp
Is this bug a regression?: ---
Last known good build:


Attachments
repro (207.36 KB, application/zip)
2016-09-08 06:22 UTC, adrianknight89
Details
updated repro project (290.90 KB, application/x-zip-compressed)
2017-02-23 19:04 UTC, Jimmy [MSFT]
Details

Description adrianknight89 2016-09-08 06:22:19 UTC
Created attachment 17372 [details]
repro

Please see repro.

If you look at MainPage.xaml, you will see that I'm using a plain button, button inside a grid, button inside a stack layout, and button inside a content view. IsEnabled changes on Android do not propagate down to children.

If you tap on the buttons like a child, you will enqueue tap gestures that will be executed every 5 seconds and a datetime value will be written to the console.

iOS seems fine.
Comment 1 adrianknight89 2016-09-12 01:26:13 UTC
I think it is okay for children to be still enabled, so perhaps like iOS, IsEnabled changes don't have to propagate, but Grid, StackLayout, and ContentView should NOT participate in hit testing so the child button should not be clickable.
Comment 2 Samantha Houts 2016-09-30 23:18:19 UTC
Should be fixed in 2.3.4-pre1. Thank you!
Comment 3 Clint 2016-11-23 15:26:36 UTC
So this bug (44096) is a duplicate of the earlier reported 43007 ???
I guess the important thing is it is fixed in the new 2.3.4-pre1
Comment 4 Parmendra Kumar 2016-11-28 16:42:45 UTC
I have checked this issue with xamarin.forms 2.3.4-pre1 and I have still getting same issue.

Hence reopened this issue.

Thanks
Comment 5 adrianknight89 2016-11-28 17:00:40 UTC
Better fix: https://github.com/xamarin/Xamarin.Forms/pull/483
Comment 6 Jimmy [MSFT] 2017-02-23 18:59:21 UTC
*** Bug 46458 has been marked as a duplicate of this bug. ***
Comment 7 Jimmy [MSFT] 2017-02-23 19:03:31 UTC
*** Bug 43007 has been marked as a duplicate of this bug. ***
Comment 8 Jimmy [MSFT] 2017-02-23 19:04:55 UTC
Created attachment 19927 [details]
updated repro project

This issue is still reproducible and is also affecting UWP, not just Android.

### Repro status
2.3.3.180:          BAD
2.3.4.192-pre2:     BAD
2.3.5.29-nightly:   BAD

I'm attaching a modified project from bug #46458 that includes a UWP project.
Comment 9 Paul DiPietro [MSFT] 2017-03-17 13:59:17 UTC
*** Bug 53445 has been marked as a duplicate of this bug. ***
Comment 10 Rui Marinho 2017-03-23 17:26:46 UTC
Should be fixed on 2.3.5-pre1.
Comment 11 Jimmy [MSFT] 2017-04-04 20:39:52 UTC
*** Bug 54462 has been marked as a duplicate of this bug. ***
Comment 12 Clint 2017-07-07 18:48:36 UTC
07jul2017
Still broken in 2.3.5-pre6 - yes 6.

Simple example with the scrollview disabled and the StackLayout also disabled will still allow the user to scroll up and down.

        <ScrollView x:Name="testScroll"
                    Grid.Row="3"
                    Grid.RowSpan="2"
                    Grid.Column="6"
                    BackgroundColor="White"
                    Orientation="Vertical"
                    IsEnabled="False">
          <StackLayout Orientation="Vertical"
                       IsEnabled="False">
            <Label>Fred</Label>
            <Label>Wilma</Label>
            <Label>Pebbles</Label>
            <Label>Dino</Label>
            <Label>Barney</Label>
            <Label>Betty</Label>
            <Label>Bambam</Label>
            <Label>Mr. Slate</Label>
            <Label>Great Gazoo</Label></StackLayout>
        </ScrollView>
Comment 13 E.Z. Hart 2017-07-10 17:04:50 UTC
This has nothing to do with which controls the ScrollView is hosted in; ScrollViews on Android and iOS are just ignoring the IsEnabled property. It's a separate bug, fixed by https://github.com/xamarin/Xamarin.Forms/pull/1049.
Comment 14 Saurabh Paunikar 2017-07-12 11:10:22 UTC
Verified on xamarin.form version 2.3.5.256-pre6. Verified on both android and UWP

ScreenCast link: https://www.screencast.com/t/YCwzSGBnMF
Comment 15 Jimmy [MSFT] 2017-08-23 18:09:50 UTC
*** Bug 58969 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.