Questions tagged [drag-and-drop]

It allows you to "grab" an object using the mouse and drag it to a different location. Drag and Drop can be done on browser-based application (web) or on native GUI applications like android or desktop

13309 questions
78
votes
6 answers

jQuery Draggable and overflow issue

I am having an undesired effect when I drag a div from a container div which is set as overflow: scroll. I have found an example of someone else where they have had the issue but I have been unable to find a resolution Example on Paste bin What…
Phill Duffy
  • 2,805
  • 3
  • 33
  • 45
75
votes
1 answer

How to use jQuery's drop event to upload files dragged from the desktop?

Is it possible to use jQuery's drop event for dragging files from the desktop? If so, how do I get the dropped file data?
Chin
  • 12,582
  • 38
  • 102
  • 152
72
votes
7 answers

WPF C#: Rearrange items in listbox via drag and drop

I am trying to figure out how to move the items in a pre-populated listbox up and down via mouse drags. I have looked at the Control.DoDragDrop method from microsoft's api, but I still can't get it to do anything. I would appreciate any help since…
Aaron
  • 1,693
  • 4
  • 26
  • 40
68
votes
4 answers

How to distinguish if a file or folder is being dragged prior to it being dropped?

I am trying to detect if a folder or a file is dragged in the dragover or dragenter events. For example: In the ondrop event, there is an argument called MouseEvent, which has a field named dataTransfer, where are listed files (.files) or items…
Kris Ku
  • 1,507
  • 1
  • 16
  • 32
67
votes
6 answers

Drag and drop elements from list into separate blocks

I'm trying to get a jQuery component similar to the one on this site. Basically, there is a list with available elements that you can drag and drop into several blocks. I have quite a bit of JavaScript development experience, but I'm quite new to…
titel
  • 3,454
  • 9
  • 45
  • 54
67
votes
3 answers

event.dataTransfer.files is empty when ondrop is fired?

Okay, I have an element set up to receive a file-drop event, but when I look in event.dataTransfer it is blank. I haven't gotten around to learning the drag-n-drop HTML5 API just yet and am still a little foggy on it. I'm working on it at my site.…
nkcmr
  • 10,690
  • 25
  • 63
  • 84
63
votes
9 answers

Visual Studio does not let me drag drop items into it?

Using Visual studio 2010 I got problems when double-clicking, for example a config file (*.config). Visual Studio would open but give me a error message about parameters. If I simple try to drag and drop a file that Visual Studio usually can read in…
Banshee
  • 15,376
  • 38
  • 128
  • 219
63
votes
4 answers

Precise Drag and Drop within a contenteditable

The Setup So, I have a contenteditable div -- I'm making a WYSIWYG editor: bold, italics, formatting, whatever, and most lately: inserting fancy images (in a fancy box, with a caption).
ChaseMoskal
  • 7,151
  • 5
  • 37
  • 50
61
votes
5 answers

UICollectionView effective drag and drop

I am currently trying to implement the UITableView reordering behavior using UICollectionView. Let's call a UItableView TV and a UICollectionView CV (to clarify the following explanation) I am basically trying to reproduce the drag&drop of the TV,…
foOg
  • 3,126
  • 3
  • 19
  • 18
60
votes
6 answers

How do I duplicate item when using jquery sortable?

I am using this method http://jqueryui.com/demos/sortable/#connect-lists to connect two lists that i have. I want to be able to drag from list A to list B but when the item is dropped, i need to keep the original one still in list A. I checked the…
odle
  • 5,172
  • 8
  • 29
  • 33
59
votes
3 answers

Qt designer: How to add widget to a layout in the designer when the layout appears infinitely thin?

I am using Qt Designer, and I would like to move a couple of top-level widgets into a horizontal layout. I have dragged a "Horizontal Layout" object into the form. I am now attempting to drag the desired widgets into the layout. Unfortunately, the…
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
59
votes
8 answers

Drag and drop onto Python script in Windows Explorer

I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a…
grok
  • 906
  • 1
  • 14
  • 14
57
votes
4 answers

When I make a draggable clone and drop it in a droppable I cannot drag it again

When I make a draggable clone and drop it in a droppable I cannot drag it again. How do I do that? Secondly I can only figure out how to us .append to add the clone to the droppable. But then it snaps to the top-left corner after any existing…
Cudos
  • 5,733
  • 11
  • 50
  • 77
57
votes
13 answers

JS library (with drag n drop) compatible with iOS and regular browsers

Does anyone know of a JS framework that has drag and drop functionality and is compatible with mobile (iOS) and regular browsers? I currently have a web-based app and it is a hassle to make its drag'n'drop functionality work on iOS... I wish there…
santa
  • 12,234
  • 49
  • 155
  • 255
56
votes
10 answers

HTML5 DnD dataTransfer setData or getData not working in every browser except Firefox

Consider this JSFiddle. It works fine in Firefox (14.0.1), but fails in Chrome (21.0.1180.75), Safari (?) and Opera(12.01?) on both Windows (7) and OS X (10.8). As far as I can tell the issue is with either the setData() or getData() methods on the…
Gup3rSuR4c
  • 9,145
  • 10
  • 68
  • 126