зеркало из https://github.com/mozilla/gecko-dev.git
Fix a similar bug whereby bookmark keywords that become full urls get added to urlbar history as keywords.
This commit is contained in:
Родитель
ee0d2c4f58
Коммит
129f4a1569
|
@ -846,7 +846,7 @@ function BrowserLoadURL(aTriggeringEvent)
|
||||||
aTriggeringEvent && 'altKey' in aTriggeringEvent &&
|
aTriggeringEvent && 'altKey' in aTriggeringEvent &&
|
||||||
aTriggeringEvent.altKey) {
|
aTriggeringEvent.altKey) {
|
||||||
_content.focus();
|
_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;
|
getBrowser().selectedTab = t;
|
||||||
gURLBar.value = url;
|
gURLBar.value = url;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -855,7 +855,7 @@ function BrowserLoadURL(aTriggeringEvent)
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
loadURI(getShortcutOrURI(url));
|
loadURI(url);
|
||||||
_content.focus();
|
_content.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1224,19 +1224,22 @@ function canonizeUrl(aTriggeringEvent)
|
||||||
if (!gURLBar)
|
if (!gURLBar)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var url = gURLBar.value;
|
||||||
if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
||||||
aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent &&
|
aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent &&
|
||||||
aTriggeringEvent.shiftKey)
|
aTriggeringEvent.shiftKey)
|
||||||
// Tack http://www. and .org on.
|
// Tack http://www. and .org on.
|
||||||
gURLBar.value = "http://www." + gURLBar.value + ".org/";
|
url = "http://www." + url + ".org/";
|
||||||
else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent &&
|
||||||
aTriggeringEvent.ctrlKey)
|
aTriggeringEvent.ctrlKey)
|
||||||
// Tack www. and .com on.
|
// Tack www. and .com on.
|
||||||
gURLBar.value = "http://www." + gURLBar.value + ".com/";
|
url = "http://www." + url + ".com/";
|
||||||
else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent &&
|
else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent &&
|
||||||
aTriggeringEvent.shiftKey)
|
aTriggeringEvent.shiftKey)
|
||||||
// Tack www. and .org on.
|
// Tack www. and .org on.
|
||||||
gURLBar.value = "http://www." + gURLBar.value + ".net/";
|
url = "http://www." + url + ".net/";
|
||||||
|
|
||||||
|
gURLBar.value = getShortcutOrURI(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdatePageProxyState()
|
function UpdatePageProxyState()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче