Bug 801391 - Set clickSelectsAll depending on the preference for the Bookmarks Library search box. r?mak
MozReview-Commit-ID: 3IhkODtMpr7
--- 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>