Bug 563117: Clicking pane selector of selected type while staying in details view should return to add-on list. r=dtownsend

This commit is contained in:
Ben Parr 2010-05-20 10:55:44 -07:00
Родитель b4a4be73f1
Коммит 5f69409343
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -596,6 +596,20 @@ var gCategories = {
self.maybeHideSearch(); self.maybeHideSearch();
gViewController.loadView(self.node.selectedItem.value); gViewController.loadView(self.node.selectedItem.value);
}, false); }, false);
this.node.addEventListener("click", function(aEvent) {
var selectedItem = self.node.selectedItem;
if (aEvent.target.localName == "richlistitem" &&
aEvent.target == selectedItem) {
var viewId = selectedItem.value;
if (gViewController.parseViewId(viewId).type == "search") {
viewId += encodeURIComponent(gHeader.searchQuery);
}
gViewController.loadView(viewId);
}
}, false);
}, },
select: function(aId) { select: function(aId) {