Bug 607922 - Once the awesome panel is opened, the Search button should open the open search menu [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 03 Nov 2010 14:45:19 +0100
changeset 66946 5cd1a037b0dde012f102c06cee0318eb1af6fec7
parent 66945 99c8792f7a4174a9b022077190452974ce7c453a
child 66947 1988636edcc1e74e626481b059dbf73205493126
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs607922
Bug 607922 - Once the awesome panel is opened, the Search button should open the open search menu [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -832,17 +832,20 @@ var BrowserUI = {
         break;
       case "AppCommand":
         aEvent.stopPropagation();
         switch (aEvent.command) {
           case "Menu":
             this.doCommand("cmd_menu");
             break;
           case "Search":
-            AllPagesList.doCommand();
+            if (!this.activePanel)
+              AllPagesList.doCommand();
+            else
+              this.doCommand("cmd_opensearch");
             break;
           default:
             break;
         }
         break;
       // URL textbox events
       case "click":
         if (this._edit.readOnly)
@@ -873,22 +876,25 @@ var BrowserUI = {
         // Disabled the search button if no search engines are available
         let button = document.getElementById("urlbar-icons");
         if (BrowserSearch.engines.length)
           button.removeAttribute("disabled");
         else
           button.setAttribute("disabled", "true");
 
         break;
-      case "NavigationPanelHidden":
+      case "NavigationPanelHidden": {
         this._edit.collapsed = true;
         this._title.collapsed = false;
 
-        document.getElementById("urlbar-icons").removeAttribute("disabled");
+        let button = document.getElementById("urlbar-icons");
+        button.removeAttribute("open");
+        button.removeAttribute("disabled");
         break;
+      }
     }
   },
 
   receiveMessage: function receiveMessage(aMessage) {
     let browser = aMessage.target;
     let json = aMessage.json;
     switch (aMessage.name) {
       case "DOMTitleChanged":