dump ("BrowserLoadURL: Currently focused element is : " + document.commandDispatcher.focusedElement.getAttribute('anonid') + ", at least that's what commandDispatcher thinks.\n");
if (document.commandDispatcher.focusedElement.getAttribute('anonid') != 'input')
{
_content.focus();
dump ("Now the _content is focused, which is : " + _content + "\n");
} else {
gBrowser.userTypedValue = null;
gBrowser.userTypedClear = true;
SetPageProxyState("valid", null); // XXX Build a URI and pass it in here.
} // JMC - Note that this hack doesn't work in trident navigation
// JMC - Is this URLBar defocusing?
}
}
function SearchLoadURL(aURL, aTriggeringEvent)
{
dump ("SearchLoadURL : " + aURL + "\t");
// showStack();
if (gBrowser.localName == "tabbrowser" &&
aTriggeringEvent && 'altKey' in aTriggeringEvent &&
aTriggeringEvent.altKey) {
_content.focus();
var t = gBrowser.addTab(aURL, null); // open link in new tab
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI(mailtoUrl, null, null);
// now pass this url to the operating system
this._launchExternalUrl(uri);
},
// a generic method which can be used to pass arbitrary urls to the operating system.
// aURL --> a nsIURI which represents the url to launch
_launchExternalUrl: function(aURL)
{
var extProtocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService);