Bug 1224907 - Bookmarks Manager Search missing in Mac Menu Bar r=stefanh
authorPhilip Chee <philip.chee@gmail.com>
Mon, 29 Feb 2016 23:07:33 +0800
changeset 19031 f5b45f40af3e
parent 19030 e625d681fc96
child 19032 f2acd8984cea
push id11683
push userphilip.chee@gmail.com
push date2016-02-29 15:08 +0000
treeherdercomm-central@f5b45f40af3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstefanh
bugs1224907
Bug 1224907 - Bookmarks Manager Search missing in Mac Menu Bar r=stefanh
suite/common/bookmarks/bookmarksManager.js
suite/common/bookmarks/bookmarksManager.xul
--- a/suite/common/bookmarks/bookmarksManager.js
+++ b/suite/common/bookmarks/bookmarksManager.js
@@ -50,16 +50,23 @@ var PlacesOrganizer = {
     if (view.rowCount > 0)
       view.selection.select(0);
 
     this._content.focus();
 
     // Set up the search UI.
     PlacesSearchBox.init();
 
+    // Fix for Bug 1224907 - Search box missing in Mac Menu Bar.
+    var toolbar = document.getElementById("placesToolbar");
+    if (toolbar.hasAttribute("autohide")) {
+      toolbar.removeAttribute("autohide");
+      document.persist("placesToolbar", autohide);
+    }
+
     window.addEventListener("AppCommand", this, true);
   },
 
   QueryInterface: function PO_QueryInterface(aIID) {
     if (aIID.equals(Components.interfaces.nsIDOMEventListener) ||
         aIID.equals(Components.interfaces.nsISupports))
       return this;
 
--- a/suite/common/bookmarks/bookmarksManager.xul
+++ b/suite/common/bookmarks/bookmarksManager.xul
@@ -119,17 +119,16 @@
     <menupopup id="placesColumnsContext"
                onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
                oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
   </popupset>
 
   <toolbox id="placesToolbox">
     <toolbar id="placesToolbar"
              class="chromeclass-toolbar"
-             type="menubar"
              align="center">
       <menubar id="placesMenu">
         <menu id="menu_File">
           <menupopup id="menu_FilePopup">
             <menuitem id="newbookmark"
                       command="placesCmd_new:bookmark"
                       label="&cmd.new_bookmark.label;"
                       accesskey="&cmd.new_bookmark.accesskey;"/>