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
44
votes
4 answers

Wpf: Drag And Drop To A Textbox

I've googled this problem, and people have answered similar questions, but for some reason I can't get anything to work. I must have missed something here... At any rate, when I run the following code, the TextBox_DragEnter handler is never…
Andrew
  • 6,144
  • 10
  • 37
  • 54
43
votes
4 answers

HTML5 drop event doesn't work unless dragover is handled

I am listening to the drop event and doing e.preventDefault() But its trying to open the dropped file. It was working fine till yesterday. But just today It broke for some unknown reason. I made a JsFiddle#bwquR/10 to reflect the Same. Edit: It…
Neel Basu
  • 12,638
  • 12
  • 82
  • 146
42
votes
19 answers

Drag/Drop feature in Android studio not working

I'm new to android programming The drag/ and drop feature in android studio is not working. I can't drag anything to my phone. Right now my fragment is google map view and i want to add a search bar to the view. It just doesn't drag. When I try to…
anu
  • 703
  • 1
  • 10
  • 19
41
votes
9 answers

How do I get the coordinate position after using jQuery drag and drop?

How do I get the coordinate position after using jQuery drag and drop? I want to save the coordinate to a database, so that next time I visit, the item will be in that position. For example, x: 520px, y: 300px? EDIT: I am PHP and mysql programmer…
michael
41
votes
10 answers

jQuery Drag And Drop Using Live Events

I have an application with a long list that changes frequently, and I need the items of that list to be draggable. I've been using the jQuery UI draggable plugin, but it is slow to add to 400+ list items, and has to be re-added every time new list…
devongovett
  • 4,850
  • 5
  • 34
  • 35
41
votes
1 answer

Bauerca drag-sort-listview simple example

Bauerca drag-sort-listview is an amazing library for the drag functionality in a list view.. https://github.com/bauerca/drag-sort-listview BUT my problem is that the demo project is pretty complex, I cant track it to include the functionality in my…
AntounG
  • 543
  • 1
  • 6
  • 9
40
votes
1 answer

jQuery's drag and drop - reverse engineering Facebook's uiTokenizer on 'Arts & Interests'

I'm reverse engineering facebook's uiTokenizer using $.special.event.drag and $.special.event.drop and jQuery because jQuery UI's sortable / draggable is heavy and slow. My question I think is related to the tolerance math for deciding when to…
Joshua F. Rountree
  • 1,462
  • 2
  • 14
  • 30
38
votes
3 answers

Disable drag&drop in solution explorer

Is there a way to disable the drag&drop functionality for Solution Explorer? Why would you ask? I'm using an wacom pen tablet for quite some years and I love it. But when you use it in solution explorer in combination with a source control like TFS…
JSC
  • 3,705
  • 3
  • 26
  • 25
38
votes
8 answers

jQuery drag and drop - how to get at element being dragged

I am using the jQuery library to implement drag and drop. How do I get at the element that is being dragged when it is dropped? I want to get the id of the image inside the div. The following element is dragged:
alexmac
  • 4,183
  • 3
  • 29
  • 32
38
votes
5 answers

Why doesn't HTML5 drag and drop work in Firefox?

I have bound events to different elements, and when I drag them in all browsers, except Firefox, it works as expected. In firefox, however, it doesn't work at all. The only event that fires is dragstart, and none of the other events fire. What's…
RandallB
  • 5,415
  • 6
  • 34
  • 47
38
votes
3 answers

How to register my own event listeners in AngularJS?

How do I register my own event listeners in an AngularJS app? To be specific, I am trying to register Drag and Drop (DND) listeners so that when something is dragged and dropped in a new location of my view, AngularJS recalculates the business…
Tonte Pouncil
  • 887
  • 2
  • 7
  • 16
37
votes
5 answers

How to use Angular7 (angular material) drag drop between two components

As recently angular introduced drag and drop in angular material https://material.angular.io/cdk/drag-drop/overview . All examples describes with in a single component. How to use this in two different components, Drag one component item and drop…
37
votes
2 answers

How can I easily duplicate the trello style of drag and drop of cards? (Kanban style app)

I'm building a web app that uses a similar drag and drop metaphor that trello has for moving cards around by dragging and dropping cards from one list to another. How can I do this?
Brad Parks
  • 66,836
  • 64
  • 257
  • 336
36
votes
8 answers

How do I prevent drag on a child, but allow drag on the parent?

I have a div which the user can drag, inside that div is a span with some text which I want to allow the user to select (thus they cannot drag it). How do I allow the div to drag, but not the span? The dragstart event is on the div. I'm probably…
aepheus
  • 7,827
  • 7
  • 36
  • 51
36
votes
6 answers

Angular 7 Drag and Drop - Dynamically Create Drop Zones

Is there a way to dynamically create drop zones? I'm having some troubles with ngFor and cdkDropList. Here is my first list and draggable elements:
sebamed
  • 1,047
  • 1
  • 9
  • 18