Hi,
I've got two problems.
1. When I open an external link in an opened window, prism opens the
url in a new window instead of using the default browser. When I open
the same link in the main application-window everything works the way
it should.
I did some debug and found out that when the link is clicked in the
opened window the function "createChromeWindow2" (webrunner.js) gets
an empty "uri"-parameter and because of that it can't check whether
the link is external and should be opened in the default browser.
I've tried a lot but I couldn't get it working properly.
2. When I click on a mailto 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 mailtos 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.