Bug 56450 - IsEnabled and Touch Events Behave Differently on Each Platform
Summary: IsEnabled and Touch Events Behave Differently on Each Platform
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.5
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-05-15 13:34 UTC by MarcinL
Modified: 2017-06-19 16:55 UTC (History)
2 users (show)

Tags: ac android uwp isenabled tapgesturerecognizer touch
Is this bug a regression?: ---
Last known good build:


Attachments
link to github repo (46 bytes, text/plain)
2017-05-15 13:34 UTC, MarcinL
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description MarcinL 2017-05-15 13:34:15 UTC
Created attachment 22169 [details]
link to github repo

Label/Grid (probably every class descended to View) with defined TapGestureRecognizer behaves differently when toggling IsEnabled property. Initial setting of IsEnabled alters behaviour on Android (any change to IsEnabled is ignored).

Android :  	
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - fires tap
- Initially Disabled - Currently Enabled - not fires tap
- Initially Disabled - Currently Disabled - not fires tap

iOS:
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - not fires tap
- Initially Disabled - Currently Enabled - fires tap
- Initially Disabled - Currently Disabled - not fires tap
	
UWP:
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - fires tap
- Initially Disabled - Currently Enabled - fires tap
- Initially Disabled - Currently Disabled - fires tap
	

Tested on Xamarin.Forms 2.3.3.180 and 2.3.4.231
Android - tested on Samsung Galaxy A5, Android 6.0 - API 23
iOS - tested on iPhone 7 Plus iOS 10.3 simulator
UWP - tested on local machine
Comment 1 Jimmy [MSFT] 2017-05-23 17:02:13 UTC
I am seeing the same behavior on each platform as listed in the description so I am confirming this bug so we can investigate further.


### Versions
2.3.5-pre3  BAD
2.3.4.231   BAD
Comment 2 Jimmy [MSFT] 2017-06-19 16:55:28 UTC
I tested this again with the 2.3.6.111-nightly build and this appears to be fixed. With 2.3.6.111 I now see the following behavior:

Android :  	
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - does not fire tap
- Initially Disabled - Currently Enabled - fires tap
- Initially Disabled - Currently Disabled - does not fire tap

iOS:
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - does not fire tap
- Initially Disabled - Currently Enabled - fires tap
- Initially Disabled - Currently Disabled - does not fire tap
	
UWP:
- Initially Enabled - Currently Enabled - fires tap
- Initially Enabled - Currently Disabled - does not fire tap
- Initially Disabled - Currently Enabled - fires tap
- Initially Disabled - Currently Disabled - does not fire tap