Click to See Complete Forum and Search --> : Dragdrop event not being triggered if source within browser


Breffnic
02-07-2006, 05:10 AM
Hi

I am developing a cross browser web component with drag & drop support. I have drop events being triggered in 3 out of 4 scenarios.
1. In IE when the source point of the item to drop is located OUTSIDE the browser
2. In IE when the source point of the item to drop is located WITHIN the browser
3. In Mozilla when the source point of the item to drop is located OUTSIDE the browser

The drop event is NOT triggered, indeed the target isn't even shown as valid drop zone if the source point of the item to drop is WITHIN a Mozilla browser.
Is this expected behaviour? Does anyone know how I can change it or where I could find documentation that expains it. I have searched the web to no avail.

Any feedback or help would be greatly appreciated

Thanks a million

phpnovice
02-15-2006, 12:19 AM
I'd be interested to know what kind of object you're using as a drop target for items located OUTSIDE the browser. In other words, to my understanding, to support such an action from OUTSIDE the browser, OLE drag-n-drop must be supported and enabled. I have written many cross-browser, non-OLE, drag-n-drop operations (via DHTML) for items INSIDE the browser window.

Joe Kurr
04-28-2006, 05:21 AM
Hi,

I basically have the same problem as Breffnic, and have tried several things.

I'm trying to make an application where a user can drag items from one browser window to another (there are three modeless popups to which can be dragged), as well as drag items inside a window.

The dragging between windows works flawlessly, both in IE and FF.
But when I drag an element in Firefox, I get the 'no drop allowed' cursor.
These are the events that are triggered during a drag action in Firefox (drag and drop in the same window, with an image which is inside a div, and is dragged to the body)

1. mousedown on the image
2. mousemove on the image (three or four times)
3. draggesture on the image
4. dragenter on the image
5. dragover on the image (only once)
6. dragexit on the image
7. dragenter on the div
8. dragover on the div (one or more times)
9. dragexit on the div
10. dragenter on the body
11. dragover on the body (one or more times)
12. dragexit on the body (this fires both when I release the mousebutton, and when I drag out of the browser window)

One thing I noticed was that if I create an absolutely positioned div, which I make visible in the dragenter event on the body, and invisible in the dragexit event, i can sometimes drop my image on the body.
But there is only a 50% chance for this to succeed, as you need to release the mouse on exactly the right time.
This makes me believe it should be possible...