Skip to main content

All Questions

Tagged with
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="...
ChaseMoskal's user avatar
  • 7,541
59 votes
5 answers
119k views

How to make <div> resizeable?

Is there a way to make a <div> container resizeable with drag & drop?
Chris's user avatar
  • 9,429
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 ...
Christopher Scott's user avatar
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 ...
Travenin's user avatar
  • 1,592
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> ...
cdleary's user avatar
  • 70.8k
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 ...
Matt Cooper's user avatar
  • 2,062
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 ...
omg's user avatar
  • 139k
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 ...
bryc's user avatar
  • 14.2k
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 ...
CodyBugstein's user avatar
  • 22.9k
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 ...
Tobias Kaufmann's user avatar
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 ...
Zenoo's user avatar
  • 12.8k
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 (...
Dbz's user avatar
  • 2,761
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, ...
Rasalom's user avatar
  • 3,111
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 ...
sazr's user avatar
  • 25.6k
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 ...
Patrick's user avatar
  • 13.5k

15 30 50 per page
1
2 3 4 5
34