mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
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:
parent
141ab0bb7f
commit
82923f20db
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user