sourceNode is not null for external drags

RESOLVED FIXED

Status

()

Core
Drag and Drop
RESOLVED FIXED
13 years ago
6 years ago

People

(Reporter: Dorando, Assigned: timeless)

Tracking

Trunk
x86
Windows ME
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8a6) Gecko/20041211 Firefox/1.0+

Once something was dragged within the application any external drag will have
the sourceNode of the previous drag.

Reproducible: Always
Steps to Reproduce:
1. Paste the following into the JavaScript Console:
Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser").addEventListener("dragdrop",function(){
var a = this.nsDragAndDrop.mDragService.getCurrentSession().sourceNode; var b =
(a ? a.localName : "no sourceNode"); this.alert(b);},true);
2. Drag something within the browser (a Bookmark)
3. Drag something to the browser (a File)

Actual Results:  
The same as step 2.


Expected Results:  
"no sourceNode"


In nsBaseDragService::EndDragSession (
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/xpwidgets/nsBaseDragService.cpp&rev=1.33#235
) I see a "mSourceDocument = nsnull;" perhaps adding "mSourceNode = nsnull;"
would help.
(Assignee)

Comment 1

13 years ago
Created attachment 172018 [details] [diff] [review]
fix described bug, reset fields, use 2 space instead of 1 space indentation...
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Attachment #172018 - Flags: superreview?(bzbarsky)
Attachment #172018 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 172018 [details] [diff] [review]
fix described bug, reset fields, use 2 space instead of 1 space indentation...

sr=bzbarsky assuming this has been tested
Attachment #172018 - Flags: superreview?(bzbarsky) → superreview+

Comment 3

13 years ago
Comment on attachment 172018 [details] [diff] [review]
fix described bug, reset fields, use 2 space instead of 1 space indentation...

a) why not mTargetSize.SizeTo(0, 0);
b) why clear mDragAction and mTargetSize in StartDragSession()?
This was fixed by bug 285438.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Comment on attachment 172018 [details] [diff] [review]
fix described bug, reset fields, use 2 space instead of 1 space indentation...

(In reply to Neil Deakin from comment #4)
> This was fixed by bug 285438.

thanks. clearing review request
Attachment #172018 - Flags: review?(neil)
You need to log in before you can comment on or make changes to this bug.