Bug 801391 - Set clickSelectsAll depending on the preference for the Bookmarks Library search box. r?mak draft
authorMark Banner <standard8@mozilla.com>
Fri, 26 Jan 2018 14:46:30 +0000
changeset 747681 2a7d42b5f6cd347fcc78161f9f11e91310e1f9d6
parent 747479 723b25eb3dd83d0bb1ea846814e9d7e1bdc78e1b
push id96977
push userbmo:standard8@mozilla.com
push dateFri, 26 Jan 2018 16:48:29 +0000
reviewersmak
bugs801391
milestone60.0a1
Bug 801391 - Set clickSelectsAll depending on the preference for the Bookmarks Library search box. r?mak MozReview-Commit-ID: 3IhkODtMpr7
browser/components/places/content/places.js
browser/components/places/content/places.xul
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -869,16 +869,19 @@ var PlacesSearchBox = {
   focus: function PSB_focus() {
     this.searchFilter.focus();
   },
 
   /**
    * Set up the gray text in the search bar as the Places View loads.
    */
   init: function PSB_init() {
+    if (Services.prefs.getBoolPref("browser.urlbar.clickSelectsAll", false)) {
+      this.searchFilter.setAttribute("clickSelectsAll", true);
+    }
     this.updateCollectionTitle();
   },
 
   /**
    * Gets or sets the text shown in the Places Search Box
    */
   get value() {
     return this.searchFilter.value;
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -321,17 +321,16 @@
 #else
         </menu>
       </menubar>
 #endif
 
       <spacer id="libraryToolbarSpacer" flex="1"/>
 
       <textbox id="searchFilter"
-               clickSelectsAll="true"
                type="search"
                aria-controls="placeContent"
                oncommand="PlacesSearchBox.search(this.value);"
                collection="bookmarks">
       </textbox>
     </toolbar>
   </toolbox>