Bug 1438180 - don't update the url bar search suggestions pref directly, r?jaws,myk draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 16 Feb 2018 17:30:34 +0000
changeset 756249 794e25ed38d520ede27230c1cb88cc0727271687
parent 756125 928f0f09172fae67f6ec00e7a63969f7b28bd12e
push id99441
push usergijskruitbosch@gmail.com
push dateFri, 16 Feb 2018 17:33:20 +0000
reviewersjaws, myk
bugs1438180
milestone60.0a1
Bug 1438180 - don't update the url bar search suggestions pref directly, r?jaws,myk In search.js, _updateSuggestionCheckboxes is already hooked up to update this checkbox based on the preference value, including change handlers for when it changes. As a result, having both the preference attribute and the 'manual' JS means that the actual checked and disabled state races with which code sets the value first. The search suggestion order preference already doesn't have a preference attribute and is only ever updated via the JS. It seems sensible to do the same here. MozReview-Commit-ID: Cm8evlembt7
browser/components/preferences/in-content/search.xul
--- a/browser/components/preferences/in-content/search.xul
+++ b/browser/components/preferences/in-content/search.xul
@@ -39,18 +39,17 @@
       </hbox>
 
       <checkbox id="suggestionsInSearchFieldsCheckbox"
                 label="&provideSearchSuggestions.label;"
                 accesskey="&provideSearchSuggestions.accesskey;"
                 preference="browser.search.suggest.enabled"/>
       <vbox class="indent">
         <checkbox id="urlBarSuggestion" label="&showURLBarSuggestions2.label;"
-                  accesskey="&showURLBarSuggestions2.accesskey;"
-                  preference="browser.urlbar.suggest.searches"/>
+                  accesskey="&showURLBarSuggestions2.accesskey;"/>
         <checkbox id="showSearchSuggestionsFirstCheckbox"
                   label="&showSearchSuggestionsAboveHistory.label;"/>
         <hbox id="urlBarSuggestionPermanentPBLabel"
               align="center" class="indent">
           <label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
         </hbox>
       </vbox>
     </groupbox>