All Questions
Tagged with drag-and-drop css
510
questions
65
votes
4
answers
21k
views
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).
<a class="...
59
votes
5
answers
119k
views
How to make <div> resizeable?
Is there a way to make a <div> container resizeable with drag & drop?
33
votes
2
answers
54k
views
What is the -webkit-user-drag css property?
I've seen this a couple places now, but can't find much information about it:
-webkit-user-drag: element
Is this part of the standard for HTML5 Drag and Drop? Is this better/worse than using the ...
32
votes
7
answers
20k
views
Custom cursor with drag and drop an HTML element without libraries
I have an HTML page which has some draggable elements. Our specs say that hovering mouse on such element the cursor must be grab , and during drag cursor must be grabbing .
I know it is possible to ...
29
votes
6
answers
58k
views
jQuery draggable table elements
jQuery's draggable functionality doesn't seem to work on tables (in FF3 or Safari). It's kind of difficult to envision how this would work, so it's not really surprising that it doesn't.
<html>
...
28
votes
4
answers
9k
views
CSS Pointer Events – Accept Drag, Reject Click
tldr; I need an element to register drag and drop pointer events, but pass click and other pointer events to elements behind it.
I am building a drag and drop photo upload feature in react using ...
27
votes
8
answers
76k
views
How to implement a drag-and-drop div from scratch with JavaScript?
It should be a combination of CSS and JavaScript. The steps to do should be:
Make it on top of all other elements (which property to specify?)
Catch the event when it is clicked (which event to ...
26
votes
2
answers
17k
views
Entire page as a dropzone for drag and drop
While writing web apps that took file input, I wanted to use drag 'n' drop, but I didn't want just a small dropzone on the page. I thought it would be more convenient if you could drop anywhere on the ...
22
votes
2
answers
8k
views
Dragging item gets hidden when overflow-y is used
I created a Fiddle to demonstrate the problem (also can be run inside this question, below).
I have a sidebar of playing card images that I want to drag into a main area. The sidebar holds a lot of ...
21
votes
5
answers
13k
views
How to change z-index of Angular CDK Drag and Drop?
I am using the Angular Material CDK Drag and Drop Functionality in my application. The drag and drop functionality is working fine, unless I am using it within a dialog (for most components I am using ...
21
votes
2
answers
29k
views
Trigger :hover selector when dragging
I'm having kind of an issue about a drag & drop system I'm currently developing.
I have a :hover style on a div the user can drop something on.
It works when I simply hover over it, but not when ...
19
votes
2
answers
22k
views
How can I set a "bounding" area for my drag-able object in javascript?
I'm making a Drag and Drop JavaScript engine. I learned how to set a bounding box as the parent element. However, now I wish to set the bounding box to any parent of any parent, or as the entire page (...
16
votes
2
answers
3k
views
Firefox is not displaying image in drag and drop ghost preview
I'm trying to display ghost element instead of default browser preview for drag and drop. The problem is that in firefox image inside ghost element is not displayed while dragging. But if I drop it, ...
14
votes
3
answers
10k
views
Drag & Drop on Safari iOS: Won't drag, won't respond to drop on desktop/iPad
I am coding a webpage to be viewed on iPad. It uses Safaris/Webkits drag & drop. I have exactly copied Safari's example drag & drop code but it won't work.
My Problem: The ondrop event is ...
13
votes
6
answers
20k
views
How can I change the cursor when dragging? Material CDK Drag and Drop
Using the Drag and Drop behavior from the Material CDK library, I'm trying to change the cursor upon dragging a cdkDrag element.
For example, in this StackBlitz the cursor is grab upon hover. I'd ...