Closed
Bug 60924
Opened 24 years ago
Closed 24 years ago
Can't drag multiple files into mozilla
Categories
(Core :: XUL, defect, P2)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla0.8
People
(Reporter: markh, Assigned: mikepinkerton)
Details
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/plain
|
Details |
It is not possible to drop multiple files onto a Mozilla window from Windows
explorer. When the clipboard code attempts to retrieve the second or
subsequent files, an exception is raised. Thus, only the first dropped file
can be accessed.
The fault is in widget/src/windows/nsDragService.cpp. The
function "GetNumDropItems()" has special handling for file drops, but
the "GetData()" function does not have the equivilent handling.
A patch is attached.
Steps to reproduce:
-------------------
* Place the attached "test.xul" into a chrome directory.
* Run Mozilla opening the chrome - eg:
mozilla -chrome "chrome://global/content/text.xul"
A window without any widgets or children will appear.
* From Explorer, select 2 files, and drop them onto the
Mozilla window.
The following messages appear:
DropOn - fetching element 0
S_OK
S_OK
Yay - got item 0
DropOn - fetching element 1
JavaScript error:
line 0: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDragSession.getData]" nsresult: "0x80004005
(NS_ERROR_FAILURE)" location: "JS frame :: chrome://komodo/content/test.xul ::
DropOn :: line 43" data: no]
-- end of output --
With the attached patch applied, the output is:
DropOn - fetching element 0
S_OK
S_OK
Yay - got item 0
DropOn - fetching element 1
S_OK
S_OK
Yay - got item 1
--
Notes on the patch:
-------------------
I chose to keep the "if index==0" the fast path, and only check
for multiple files when index != 0. However, this has resulted in
a duplicate call to nsClipboard::GetDataFromDataObject() which
could otherwise be avoided.
I also added 2 extra assertions, for when an invalid index has been specified.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
Awesome. I'll try to land this soon.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: patch
Priority: P3 → P2
Summary: Can not drop multiple files from Windows onto Explorer. → Can't drag multiple files into mozilla
Target Milestone: --- → mozilla0.9
Updated•24 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9 → mozilla0.8
Comment 5•24 years ago
|
||
Let's not let the patch rot...
Reporter | ||
Comment 6•24 years ago
|
||
I've a few patches rotting ATM, but I don't know what preservative to use! Is there a generally accepted "polite" way for me to nudge well reported bugs with patches along?
Comment 7•24 years ago
|
||
You could send an email directly to pinkerton. (Sometimes the volume of bug
email gets to a bit much, and some bug comments get missed, particularly at
a time like now, when everyone will be trying to catch up on 1000 or more
bugzilla emails over the holidays).
That said, though, I note that on Dec. 18, Mike re-scheduled this bug for the
next milestone (0.8), so that means he will be doing this Real Soon Now.
Assignee | ||
Comment 8•24 years ago
|
||
landed. r=saari/sr=hyatt
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•24 years ago
|
||
Works for me! Thanks guys!
You need to log in
before you can comment on or make changes to this bug.
Description
•