Bug 424690 - "search-go-button don't ignore right click" [p=sevenfurnace@gmail.com r=gavin a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2008-04-01 01:31:42 -07:00
Родитель 91deaf2a7a
Коммит 845e20747e
1 изменённых файлов: 12 добавлений и 8 удалений

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

@ -464,6 +464,18 @@
<method name="handleSearchCommand">
<parameter name="aEvent"/>
<body><![CDATA[
var where = "current";
if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button") {
if (aEvent.button == 2)
return;
where = whereToOpenLink(aEvent, false, true);
}
else {
var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
if ((aEvent && aEvent.altKey) ^ newTabPref)
where = "tab";
}
var textBox = this._textbox;
var textValue = textBox.value;
@ -473,14 +485,6 @@
textValue);
}
var where = "current";
if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button")
where = whereToOpenLink(aEvent, false, true);
else {
var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
if ((aEvent && aEvent.altKey) ^ newTabPref)
where = "tab";
}
this.doSearch(textValue, where);
]]></body>
</method>