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?
}
UpdateStatusBarEngineIcon();
}
function SearchLoadURL(aURL, aTriggeringEvent, reuseTab)
{
// dump ("SearchLoadURL : " + aURL + "\t");
// showStack();
// We need to add a flag to reuse the same tab for browsing.
// First search through the tabs to see if we have a "search" tab
var cnTabs = gBrowser.tabContainer.childNodes;
var numtabs = cnTabs.length;
var tabBrowser = getBrowser();
// MERC (rpaul) only reuse a tab if called from showMoreResults()
if (numtabs>=1 && reuseTab)
{
for (var i = 0; i < numtabs; ++i)
{
var searchAttrib = cnTabs[i].getAttribute("searchtab");
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);