Bug 1169704 - In-content preferences - Search tab - "One-click search engines" table remains highlighted after clicking elsewhere on the page, r=jaws

MozReview-Commit-ID: 2Tbzr0wSpv1
This commit is contained in:
Fischer.json 2016-07-26 18:12:42 +08:00
parent 141ab0bb7f
commit 82923f20db

View File

@ -106,6 +106,18 @@ var gSearchPane = {
handleEvent: function(aEvent) {
switch (aEvent.type) {
case "click":
if (aEvent.target.id != "engineChildren" && aEvent.target.id != "removeEngineButton") {
let engineList = document.getElementById("engineList");
// We don't want to toggle off selection while editing keyword
// so proceed only when the input field is hidden
if (engineList.inputField.hidden) {
let selection = engineList.view.selection;
if (selection.count > 0) {
selection.toggleSelect(selection.currentIndex);
}
engineList.blur();
}
}
if (aEvent.target.id == "addEngines" && aEvent.button == 0) {
Services.wm.getMostRecentWindow('navigator:browser')
.BrowserSearch.loadAddEngines();