Answer the question
In order to leave comments, you need to log in
How can I drag an object into an iframe in JavaScript so that the drag doesn't end when the cursor leaves the iframe's frame?
it is necessary to do it the way it is done in google maps, when the cursor goes beyond the ifram'a while dragging the map, the dragging does not end.
I do it with .onmousedown, .onmousemove, .onmouseup. they don't fire when the cursor goes out of bounds.
How is this drag and drop implemented?
Answer the question
In order to leave comments, you need to log in
Probably, drag-n-drop events are still used there. Link to the topic: www.useragentman.com/blog/2010/01/10/cross-browser...
Most likely not. IFrame is a completely different DOM. Judging by the description, you are trying to drag an element from its DOM to another DOM. In the case of the DnD API, there is most likely a limitation at the specification level. Before the advent of the DnD API, this was done by adding absolute positioning to the element and changing its coordinates. In this implementation, the element cannot go beyond its body. If you really want to, you can catch the moment when you get close to the edge, hide the original element in the frame, and create a copy of it outside the frame. But if I were you, I would first think about whether all this is really necessary.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question