Bug 16359 - Drag & Drop code doesn't work
Summary: Drag & Drop code doesn't work
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 4.2.x
Hardware: PC Windows
: High major
Target Milestone: master
Assignee: Cody Russell
: 7198 9302 12843 16426 16446 19659 25101 ()
Depends on:
Reported: 2013-11-20 06:49 UTC by info
Modified: 2018-01-25 06:18 UTC (History)
18 users (show)

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

Dragging code in another place and the tag returns to the original position without moving or copying (34.30 KB, image/png)
2013-11-20 06:49 UTC, info
Logs (6.50 KB, application/octet-stream)
2014-02-08 11:23 UTC, ilya.golovach
new logs after the issue occurs again (11.85 KB, application/octet-stream)
2014-02-17 20:38 UTC, ilya.golovach

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 for Bug 16359 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description info 2013-11-20 06:49:28 UTC
Created attachment 5484 [details]
Dragging code in another place and the tag returns to the original position without moving or copying

Whenever I select a portion of code and drag it into another place with or without holding ctrl  or shift (for copying or moving) the dragged text remains where it was and no copy/move action is performed.
Comment 1 narayanp 2013-11-20 07:26:31 UTC
I have checked this issue with following builds and I am unable to reproduce
this issue:

Maverick and Lion
X.S 4.2.1 (build 1)
Mono 3.2.4

I am successfully able to drag code to another place. This is the screencast for the same: http://screencast.com/t/0HypGPZNV

Could you please retest it?
Comment 2 Mikayla Hutchinson [MSFT] 2013-11-20 15:44:35 UTC
@narayanp this is Windows, not Mac. I can reproduce it on Windows. Possibly a dup of bug 9302.
Comment 3 info 2013-11-21 05:17:31 UTC
Exactly, on mac works for me too, on windows doesn't.

Let me show you: http://www.screencast.com/t/YxHr7Tyier
Comment 4 Cody Russell 2013-11-21 11:26:55 UTC
Thanks for the screencast.  I've started working on bug 9302, hopefully I can fix both of these in one go.
Comment 5 Mikayla Hutchinson [MSFT] 2013-11-24 13:59:55 UTC
*** Bug 16426 has been marked as a duplicate of this bug. ***
Comment 6 ilya.golovach 2013-11-24 16:03:16 UTC
Also valid for 4.2.2 from Beta channel
Comment 7 Mikayla Hutchinson [MSFT] 2013-11-26 13:42:09 UTC
*** Bug 16446 has been marked as a duplicate of this bug. ***
Comment 8 Cody Russell 2013-12-05 15:04:40 UTC
*** Bug 12843 has been marked as a duplicate of this bug. ***
Comment 9 ilya.golovach 2014-01-27 09:11:26 UTC
Several months - and no fix. This is ridiculous. What are we paying for? Android drag and drop designer does not work at all because of this issue.
Comment 10 ilya.golovach 2014-02-08 11:23:34 UTC
Created attachment 6007 [details]

As requested in the forum, I am uploading the logs plus XS details info. Just to note, that when I was coping these logs, drag and drop of components worked, but the code did not. However, it happened this way in the past, when drag and drop of the components did not work for majority of time, but for unknown reasons worked sometimes.
Comment 11 ilya.golovach 2014-02-17 20:38:07 UTC
Created attachment 6077 [details]
new logs after the issue occurs again

The issue was not present when I uploaded previous logs. However, it is back again - I can not drop any visual component from toolbox. The only thing that has been changed so far - XS was updated before testing. I even did not open it since last test. Thus, I am attaching new logs, maybe they have some new info. If not, it would be good if you can imagine of any other way I can test the reasons of the issue. 

Attached logs represents following actions:
1) XS is opened
2) The layout of some default (earlier created) is opened
3) Button is drag and drop to the stage.

The error in line 1243 logs just after dropping the button.
Comment 12 Lluis Sanchez 2014-03-04 11:28:52 UTC
*** Bug 9302 has been marked as a duplicate of this bug. ***
Comment 13 Lluis Sanchez 2014-06-09 04:49:57 UTC
Cody, wasn't this fixed?
Comment 14 Alex 2014-07-13 03:48:20 UTC
From a user standpoint: this was fixed on later versions of Xamarin 4. It came back since Xamarin Studio 5.
This is just a regression, it's annoying and it should be quick to fix since it already was... If only someone would look into it for a minute.

PS: The ability to drag'n drop selected text is not just faster than copy-paste, it also spare from overwriting the clipboard.
Comment 15 Barton 2014-12-02 19:14:46 UTC
Agreed; Leaving the clipboard intact while, at the same time, being able to move text quickly (I find Alt+Up/Down awkward) is a big bonus. Mostly, though, drag-n-drop is a fast method that all good editors need to provide. Thanks, Team!
Comment 16 Tyson 2014-12-03 14:41:12 UTC
I've been using Xamarin Studio since last January, and dragging and dropping code in Source window has NEVER worked.

-Windows 7
-EVERY version of Xamarin Studio released in 2014
Comment 17 Barton 2014-12-03 14:44:33 UTC
The odd thing is that the Monodevelop branch does not suffer from this issue (on Linux).
Comment 18 Cody Russell 2014-12-03 14:55:54 UTC
That's because monodevelop (and Xamarin Studio) UIs are based on gtk+, and the bug is in gtk's Windows backend.

I've started working on this, but I'm the only person working on gtk issues right now and I have to prioritize. Recently I've been fixing keyboard input on Windows for users of international keyboard layouts, and right now I'm working on a couple Mac issues.  I know it's frustrating that drag-and-drop doesn't work yet, but I promise I will get back to this one!
Comment 19 Jérémie Laval 2014-12-05 09:05:04 UTC
*** Bug 25101 has been marked as a duplicate of this bug. ***
Comment 20 Cody Russell 2015-09-22 11:09:53 UTC
*** Bug 19659 has been marked as a duplicate of this bug. ***
Comment 21 Cody Russell 2015-09-22 11:10:25 UTC
*** Bug 7198 has been marked as a duplicate of this bug. ***
Comment 22 Gusman 2016-01-29 10:19:00 UTC
This has been more than two years and this bug is still present, will it be fixed?
Comment 24 Gerard Carbó 2017-08-13 11:58:16 UTC
cody@xamarin.com Please, please!!!
Comment 25 Barton 2018-01-05 06:06:07 UTC
As of (at least) Monodevelop 6.2, text editor dragging text is broken. Very sad.
Comment 26 Barton 2018-01-25 06:18:45 UTC
Actually, it turns out that just the visual cue that the drag is possible is missing. If one takes it on faith that the drag will occur, the UI will kick in for the drop.