Bug 1374852 - Visiting preferences should always focus on search field r?jaws draft
authorRicky Chien <ricky060709@gmail.com>
Thu, 22 Jun 2017 14:59:51 +0800
changeset 598754 b1474d842ac96afa6e5e77f875d9b67bd4bbd14e
parent 598698 f8bb96fb5c4f9960c5f754f877eceb677df18ddc
child 634573 49f8eec72b438e47b4afec34f4f170d1ab100714
push id65313
push userbmo:rchien@mozilla.com
push dateThu, 22 Jun 2017 07:00:18 +0000
reviewersjaws
bugs1374852
milestone56.0a1
Bug 1374852 - Visiting preferences should always focus on search field r?jaws MozReview-Commit-ID: I7mnm5EkeIg
browser/components/preferences/in-content-new/findInPage.js
--- a/browser/components/preferences/in-content-new/findInPage.js
+++ b/browser/components/preferences/in-content-new/findInPage.js
@@ -13,16 +13,17 @@ var gSearchResultsPane = {
   init() {
     this.searchResultsCategory = document.getElementById("category-search-results");
 
     this.searchInput = document.getElementById("searchInput");
     this.searchInput.hidden = !Services.prefs.getBoolPref("browser.preferences.search");
     if (!this.searchInput.hidden) {
       this.searchInput.addEventListener("command", this);
       this.searchInput.addEventListener("focus", this);
+      this.searchInput.focus();
     }
   },
 
   handleEvent(event) {
     if (event.type === "command") {
       this.searchFunction(event);
     } else if (event.type === "focus") {
       this.initializeCategories();