Bug 21258 - UIButtons Jumping to Wrong Location on Double Click
Summary: UIButtons Jumping to Wrong Location on Double Click
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS Designer ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Vinicius Jarina
URL:
: 21132 ()
Depends on:
Blocks:
 
Reported: 2014-07-11 09:41 UTC by Kevin Mullins
Modified: 2016-09-19 17:39 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

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:
VERIFIED FIXED

Description Kevin Mullins 2014-07-11 09:41:20 UTC
In the iOS Designer with the design surface view zoomed to less than 100%, if the user double clicks a UIButton to create an Action Outlet returning to the design surface after dropping the wire up method in the UIViewController's .cs file causes the button to jump to a new location in the view controller.

This is especially true of an iPad storyboard and the more the user is zoomed out, the greater the "jump".

Steps to reproduce:

1) Add a UIViewController to a storyboard and create a custom class for the view.
2) Add a UIButton to the view controller above and name the button.
3) Zoom out to less than 100% (the greater the zoom out the bigger the effect)
4) Double click the button to create an Action Outlet.
5) Xamarin Studio switches to the .cs file for the UIViewController.
6) Drop the buttons wire up code into the .cs file.
7) Return to the storyboard editor and move the mouse. The button will move as if the user has mouse-down in the button and is dragging it to a new location.
8) The designer surface quickly catches up, but by that point the button's location has been changed.

It's like the design surface thinks the user is dragging the button in question for a few seconds when the user first switches back to the storyboard tab with the open design surface. After a few seconds the designer "recognizes" that the mouse isn't down and drops the button in a new location.
Comment 1 Kevin Mullins 2014-07-11 10:01:14 UTC
You can use this project to test out the above issue:
https://www.dropbox.com/s/pw81m91e5fqphqs/ViewControllers.zip

1) Open the iPad storyboard.
2) Zoom out to 50%.
3) Find the First View Controller and double click on the top button.
4) View switch to the .cs file, return to the iOS Designer.
5) Move the mouse quickly.
Comment 2 Alan McGovern 2014-07-25 15:03:35 UTC
*** Bug 21132 has been marked as a duplicate of this bug. ***
Comment 3 Alan McGovern 2014-08-12 14:52:02 UTC
Just an update, this is fixed as part of https://github.com/xamarin/md-addins/tree/drag_fix.

Unfortunately the fix triggers in inexplicable random error in Visual Studio so we can't land it yet.
Comment 4 Alan McGovern 2014-08-17 13:12:46 UTC
This was fixed in commit 1426f71ab105944eb75a0de1ec6837436a2f7b69
Comment 5 asimk 2016-09-19 17:39:33 UTC
This issue has been fixed with Master build.
Screencast: http://www.screencast.com/t/9qfWcmo7y7