Closed Bug 32357 Opened 25 years ago Closed 25 years ago

Right-clicking Item in FTP Directory List Brings Up Both Context Menu and Starts Download

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: khecht, Assigned: law)

References

()

Details

(Whiteboard: [nsbeta2+] ETA 7/14 fix in hand, reviewed by waterson)

Attachments

(1 file)

Right-clicking any item in the directory list on an FTP server not only results in the right-click context menu appearing as expected, but it also initiates the download of the item you right-clicked on, as though you left-clicked it instead. This is not expected, as right-clicking should only bring up the context menu. Found on build 2000031508 running on NT; should affect at least all Win32 and it's probably a cross platform issue. Steps to reproduce: 1. Go to any FTP directory, such as ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/ 2. Right-click a file. 3. Note that the right-click context menu immediately appears as expected. 4. Note that a download of the item also begins. This is not expected.
Confirming this. Happens on Linux as well. Console output: X Pos: 151 Y Pos: 314 JavaScript Error: uncaught exception: [Exception... "Method not implemented" code: "-2147467263" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "chrome://navigator/content/nsContextMenu.js Line: 211"] Error loading URL ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/MozMacInstaller-M15-nb1b.sea.bin Document: Done (88.82 secs) WEBSHELL+ = 12 data.contentType = application/octet-stream JavaScript Error: TypeError: contextMenu has no properties Reassign to Mr FTP and cc law.
Assignee: gagan → valeski
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
over to don
Assignee: valeski → don
*** Bug 33046 has been marked as a duplicate of this bug. ***
just a line regarding bug 33046 - this bug is also in nb1b now.
Reassigning as per Don
Assignee: don → law
Keywords: nsbeta2
Target Milestone: --- → M17
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: [nsbeta2+]
There's something funky about the pseudo-content that displays ftp directory listings. I'm not sure what it is, yet. But, the same problem might result if there were similar html/xml written by hand.
Status: NEW → ASSIGNED
Um, I'm reassigning to Chris.
Assignee: law → waterson
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
saved by rjc.
Assignee: waterson → rjc
Status: ASSIGNED → NEW
With a build from today, right-clicking a FTP file item no longer immediately downloads it... however, I still see the JS error (now at line # 229 in nsContextMenu.js)... so I'm giving this to back to law (as he owns that file) as the usage of "this.target.style.getPropertyValue()" is failing. Bill, most likely "this.target" isn't what you think it should be, so you should perhaps add some error checking at that point in nsContextMenu.js
Assignee: rjc → law
Well, I think it should be something that's implemented, I guess :-). Here's what I see: ###!!! ASSERTION: write me!: 'NotYetImplemented', file e:\mozilla\rdf\content\sr c\nsXULElement.cpp, line 4090 JavaScript error: line 0: uncaught exception: [Exception... "Method not implemented" code: "-214 7467263" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "chrome:// navigator/content/nsContextMenu.js Line: 229"] The JS code fails because the xul element doesn't implement GetStyle (called when the JS code references the .style property). This code is trying to determine if the element clicked-on has some style attribute that would display an image. Perhaps there's another way to do that in the case where the element is xul? Beyond that, somehow we have to figure out how the context menu should behave for ftp directory listings. It would be nice if the vanilla nsContextMenu code just worked, but that means it would have to be HTML, essentially. I'll have to look at the .xul for ftp directory listings and figure out a way to distinguish between it and normal content.
Status: NEW → ASSIGNED
*** Bug 43754 has been marked as a duplicate of this bug. ***
Blocks: 43754
Putting on [nsbeta2-] per Nav Beta2 review today.
Whiteboard: [nsbeta2+] → [nsbeta2-]
Attached patch FixSplinter Review
I've attached a fix for this. I'm working on getting OK to check this in for beta2.
Bill, suggestion: Doing checks like this: if ( root.getAttribute( "id" ) == "tree" ) is very fragile. I'd recomment using something like (pseudocode): root.tagName == "tree" Basically, the "id"s name could change from "tree" to "foo", however, its tag would always still be <tree>.
Marking Fixed per gagan
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I think Gagan must have wanted some other bug marked fixed. This one isn't unless somebody else checked in the patch (modified per Robert's suggestion).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [nsbeta2-] → [nsbeta2+] ETA 7/14 fix in hand, reviewed by waterson
Target Milestone: M17 → M18
Marking this "nsbeta2+" because the fix has been done for awhile, tested, and reviewed by waterson. Let's get it in the tree before we lose the bits.
fixed
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
verified: WinNT 2000072108 Linux 2000072020 Mac os8.6 2000072108 checked control-click
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: