From 5f694093439898a289c49bbf9515da6a3e7a03b7 Mon Sep 17 00:00:00 2001 From: Ben Parr Date: Thu, 20 May 2010 10:55:44 -0700 Subject: [PATCH] Bug 563117: Clicking pane selector of selected type while staying in details view should return to add-on list. r=dtownsend --- toolkit/mozapps/extensions/content/extensions.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index 7a98bf81a18..ab832270d2f 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -596,6 +596,20 @@ var gCategories = { self.maybeHideSearch(); gViewController.loadView(self.node.selectedItem.value); }, 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) {