Open Bug 503158 Opened 12 years ago Updated 9 years ago

Drag & Drop: Drop event


(Core :: DOM: Drag & Drop, defect)

1.9.1 Branch
Windows XP
Not set





(Reporter:, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/ Safari/530.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 XPCOMViewer/0.9a

This is the example from mozilla development center.
The resource code is in:

The problem is we can not catch the "drop event" or 
the follow code "dragService.getCurrentSession().canDrop = true;" throw an exception. 

Reproducible: Always

Steps to Reproduce:
1.go the link "" drag and drop the image
3.Can't not drop 

Expected Results:  
This is the code: 
function eventReceived(event)
  if ((event.type == "dragenter") || (event.type == "dragover"))
    dragService.getCurrentSession().canDrop = true;
  var output = document.getElementById("output");
  output.textContent += event.type + "\n";

Except result: document should show "drop"
Component: General → Drag and Drop
Product: Firefox → Core
QA Contact: general → drag-drop
Version: unspecified → 1.9.1 Branch
reproduced on

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7) Gecko/20100101 Firefox/4.0b7 ID:20101104142426
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b8pre) Gecko/20101210 Firefox/4.0b8pre ID:20101210044843

(the image is not captured)

but, drag image work with
Whatever this example, it should just be removed as it uses the now deprecated api.
You need to log in before you can comment on or make changes to this bug.