Drag event listener for questions regarding programming in ECMAScript (JavaScript/JS) [node.js], [jquery] and [html]
Questions tagged [drag-event]
9 questions
1
vote
1 answer
DragEvent.relatedTarget returns null in Safari
If I try to check e.relatedTarget for dragleave event, in Safari (v14.1.2) it is always null.
You can see it here (add console.log) — https://jsfiddle.net/zfnj5rv4
In Chrome it works fine.
This page says that Safari supports…

Inversion
- 1,131
- 13
- 19
1
vote
1 answer
Add drag event listener to iframe
I create an iframe in JavaScript and add a drag enter event listener to it.
I wrote a small sample here:
Codepen
drag.addEventListener("dragenter", dragEnter, false)
It works well in codepen.
My real project is in a chrome extension. I write the…

K.C.
- 41
- 1
- 5
0
votes
0 answers
How to change the cursor in React DnD using react-dnd-multi-backend
How can I change the cursor when dragging an item? I am using Preview.
Found a variant using touch backend but it does not suit me. Maybe someone has encountered something similar
const DragItem: React.FC = (props) => {
const { item…
0
votes
0 answers
drag event switch processor
I want to achieve an effect by Konva, a High Level API tool based on HTML 5 canvas. The effect is like PS, assuming dragging something on layer, but when pass "SPACE" , all dragging become dragging the layer.
Thus, when Dragging is not started by…

SuRuicong
- 1
- 1
0
votes
1 answer
How to get the position of the object without touching it in react naitve?
I want to get the position of the object without touching the view or the object.
I am using enter link description here
to slide the object but i want to get the position of the object without touching the slider.
Is there any way to get the…

Kaushal Lalani
- 125
- 2
- 16
0
votes
0 answers
android studio onDragListener not working
Touch works, but Dragging doesn't seem to work at all, what is going on?
public class NavMap extends View {
public NavMap(Context c){
super(c);
OnTouchListener touch = (view, motionEvent) -> {
Log.i("I", "Touch");
…

Kai Kishpaugh
- 3
- 2
0
votes
1 answer
When using a d3 Reusable Chart pattern how do you implement on drag when Dispatching Events (d3v5 +)?
I am developing a set of d3 Reusable Charts - vanilla and in one page. (I know this is not great practice but as this is a learning exercise for me I find it easier to follow the code this way.) Using the pattern from ProD3 Book by Marcos Iglesias …

Jim M
- 17
- 8
0
votes
1 answer
Detect when a dragged item is dragged out of the window. document.ondragleave()?
I'm trying to detect when a HTML element is dragged out of the document and off of the window. However, the dragleave event bubbles up, so document.documentElement.ondragleave gets triggered with every element that the drag leaves in its path to the…

jjeff
- 21
- 2
-1
votes
1 answer
Javascript class properties, eventlistener and object properties. Constant scope outside constructor not working
I am trying to create an object that each property is a class property.
This means I have a class named Ship which has 3 properties: type, length, orientation. I am trying to create an object named shipObj that all its properties are getting values…