зеркало из https://github.com/mozilla/pjs.git
Bug 424690 - "search-go-button don't ignore right click" [p=sevenfurnace@gmail.com r=gavin a1.9=beltzner]
This commit is contained in:
Родитель
91deaf2a7a
Коммит
845e20747e
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче