Fix a similar bug whereby bookmark keywords that become full urls get added to urlbar history as keywords.

This commit is contained in:
blakeross%telocity.com 2002-11-08 01:24:37 +00:00
Родитель ee0d2c4f58
Коммит 129f4a1569
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -846,7 +846,7 @@ function BrowserLoadURL(aTriggeringEvent)
aTriggeringEvent && 'altKey' in aTriggeringEvent &&
aTriggeringEvent.altKey) {
_content.focus();
var t = getBrowser().addTab(getShortcutOrURI(url)); // open link in new tab
var t = getBrowser().addTab(url); // open link in new tab
getBrowser().selectedTab = t;
gURLBar.value = url;
event.preventDefault();
@ -855,7 +855,7 @@ function BrowserLoadURL(aTriggeringEvent)
event.stopPropagation();
}
else
loadURI(getShortcutOrURI(url));
loadURI(url);
_content.focus();
}
}
@ -1224,19 +1224,22 @@ function canonizeUrl(aTriggeringEvent)
if (!gURLBar)
return;
var url = gURLBar.value;
if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent &&
aTriggeringEvent.shiftKey)
// Tack http://www. and .org on.
gURLBar.value = "http://www." + gURLBar.value + ".org/";
url = "http://www." + url + ".org/";
else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
aTriggeringEvent.ctrlKey)
// Tack www. and .com on.
gURLBar.value = "http://www." + gURLBar.value + ".com/";
url = "http://www." + url + ".com/";
else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent &&
aTriggeringEvent.shiftKey)
// Tack www. and .org on.
gURLBar.value = "http://www." + gURLBar.value + ".net/";
url = "http://www." + url + ".net/";
gURLBar.value = getShortcutOrURI(url);
}
function UpdatePageProxyState()