Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 18900 [details]
Test XS project shown in the video
Clicking a UIButton or descendant class fires the touch up inside event when the touch up is actually outside the button. Please see the attached test project, screen shots, and video.
Created attachment 18901 [details]
Screenshot of the Xcode mapping
Created attachment 18902 [details]
Screenshot of the event handler implementation
Created attachment 18903 [details]
Video recording of the test
Upon further testing, I am able to get the Outside label to appear but the touch has to be lifted very far away from the button. So maybe this is expected behavior and this issue can be closed.
there is this sentence:
The TouchUpInside event occurs when the user performs a touch operation that begins and ends inside the bounds of the button.
I am interested in learning why this issue has been marked as invalid, with no supporting screen shot, URL, or sentence of explanation.
The bug has been marked as invalid due to the following:
The behaviour your are experiencing is the expected one with a UIButton, it cannot be changed by us (xamarin engineers). In your screencast, the mouse is no leaving the tappable area of the UIButton and ergo, even if visually it does look that you are outside, you are not. This is of course due to the fact that we are working with a touch UI.
Repeating the test and making sure that you leave the tappable area will have the expected result. If you want to reduce the hit area of the button you will need to extend the UIButton and override:
public virtual Boolean PointInside (PointF point, UIEvent uievent)
So that it works as you expect it. As you mentioned in comment 4, yes, the event gets called if you leave the tap area, ergo, the bug is invalid and you did discover the issue by yourself and that is the reason the bug was closed with no comment.
Sorry if there was a misunderstanding when closing the bug, definitely a comment explaining the reason for the invalidation of the bug was needed, sorry for that.
I would like to add this quick Objective C sample to show that the same behavior would happen with native code: https://www.dropbox.com/s/w39uhfnibs0bepb/Bug50201.zip?dl=0
Also I added the "TouchDragOutside" event so you can see in the logs (debug area) when exactly the "outside" touch zone is reached.
This is all a bit confusing and I couldn't find any good documentation about this native iOS behavior.
The doc you found (from us, same as Apple): "The TouchUpInside event occurs when the user performs a touch operation that begins and ends inside the bounds of the button." is confusing because the "bounds" of the UIButton are similar to what's drawn, so 150x50 in your case, and the "touch area" is also contained within this draw area.
What I believe happens (and again since that's internal behavior these are just assumptions, helped by community posts) is that since it's a touch UI (like Manuel said) iOS creates like an "extended safe zone" to be 100% sure all humans (we don't all have the same fingers) indeed exit the touch area of the button.