Closed Bug 526736 Opened 16 years ago Closed 7 years ago

Mailto-links don't open a new window, the declared mailto-handler-site is loaded into the actual selected frame/window

Categories

(Mozilla Labs :: Prism, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dummeridiot, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729) Build Identifier: When I click on a mailto-link inside my application my registered mailto- protocoll-site isn't opened in a new window, instead of that it loads it in my actual selected window or iframe. At first I've had the same problem with mailto-links from external programs, but I changed the following in the "handle"-function (components\nsCommandLineHandler.js): "... // Check for an existing window and reuse it if there is one if (win) { if (protocolURI) { var ios = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService); if (ios.extractScheme(uriSpec)=="mailto") { try { var x = Math.round((screen.availWidth - 800) / 2); var y = Math.round((screen.availHeight - 600) / 2); } catch(e) { var x = 300; var y = 200; } var featureString="scrollbars=no, dependent=yes, resizable=yes, left=" + x + ",top=" + y + ",width=800, height=600"; var newWin = win.open(protocolURI, "NewMail", featureString); //win.open (protocolURI,"NewMail","scrollbars=no,dependent=yes,resizable=yes"); } else { win.document.getElementById("browser_content").loadURI (WebAppProperties.uri, null, null); } } aCmdLine.preventDefault = true; return; }" I've found the function where the mailto gets assigned ("newURI" in components\nsPlatformGlue.js) but I don't have a clue what happens after that. Reproducible: Always Steps to Reproduce: 1.Register a protocol handler. For example: "platform.registerProtocolHandler("mailto", "http://www.example/mail/message.html?action=NEW&to=%s"); 2.Click somewhere in your application on a mailto-link. For example "test@test.de" Actual Results: "http://www.example/mail/message.html?action=NEW&to=test@test.de" is loaded in the actual window/frame. Expected Results: "http://www.example/mail/message.html?action=NEW&to=test@test.de" should be opened in a new window.
what is platform.registerProtocolHandler? is it an about:config pref?
(In reply to Joe Wilson from comment #1) > what is platform.registerProtocolHandler? is it an about:config pref? I think he means navigator.registerProtocolHandler. But this also happens one just chooses Gmail from the preferences, and presumably also Yahoo Mail, and it's really not what one would expect ... And just to rub things in, it also loses history: see bug 499527. (Though, uh, maybe that part's to do with some cruft in my profile; it doesn't seem to happen on a more-recently-created one. On the other hand, having an optional "feature" to lose history when you click on mailto: links is not at all useful ...)
To make the process simpler, by default Firefox offers gmail and yahoo mail as webmail handlers. You can just go to about:preferences#applications and select it, then try clicking a mailto link. Here is screenshot of setting the webmail handler - http://i.imgur.com/UM5vQXs.png
I can confirm this behavior so marking it as "new" bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Prism isn't maintained anymore. Mass closing of the bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.