mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Bug #302683 --> Get More Themes (Extensions) doesn't launch a browser in Thunderbird
make the textlink widget smart enough to send non exposed urls out to the desktop instead of trying to open them internally. sr=neil r=bsmedberg a=bsmedberg
This commit is contained in:
parent
14e0a65e8c
commit
37412e5b66
@ -299,7 +299,27 @@
|
||||
return;
|
||||
var href = this.getAttribute('href');
|
||||
if (href)
|
||||
{
|
||||
try {
|
||||
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(href, null, null);
|
||||
|
||||
var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
|
||||
.getService(Components.interfaces.nsIExternalProtocolService);
|
||||
// if the scheme is not an exposed protocol, then opening this link should
|
||||
// be deferred to the system's external protocol handler
|
||||
if (!protocolSvc.isExposedProtocol(uri.scheme))
|
||||
{
|
||||
protocolSvc.loadUrl(uri);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (ex) {}
|
||||
|
||||
// otherwise, fall back to opening the anchor directly
|
||||
open(href);
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
<handler event="keypress" keycode="VK_ENTER" action="this.click()" />
|
||||
|
Loading…
Reference in New Issue
Block a user