Bug 1382566 - Ctrl+F should focus the preferences search input. r=jaws
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Mon, 14 Aug 2017 00:13:53 +0530
changeset 375132 adce349dfe860298ba4328ba34207f4c91084b97
parent 375131 587887d425c8bb0048beec05c294b67002a3a7cd
child 375133 e5ee9fb0f610dbf877f0c90c8e8da886dbba52ee
push id48948
push userryanvm@gmail.com
push dateWed, 16 Aug 2017 19:10:02 +0000
treeherderautoland@adce349dfe86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1382566
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382566 - Ctrl+F should focus the preferences search input. r=jaws MozReview-Commit-ID: 4nUbxQYMHZv
browser/components/preferences/cookies.xul
browser/components/preferences/in-content-new/main.js
browser/components/preferences/in-content-new/main.xul
browser/components/preferences/in-content-new/preferences.xul
browser/components/preferences/in-content/applications.js
browser/components/preferences/in-content/applications.xul
browser/locales/en-US/chrome/browser/preferences-old/applications.dtd
browser/locales/en-US/chrome/browser/preferences/applications.dtd
browser/locales/en-US/chrome/browser/preferences/cookies.dtd
--- a/browser/components/preferences/cookies.xul
+++ b/browser/components/preferences/cookies.xul
@@ -22,17 +22,16 @@
   <script src="chrome://browser/content/preferences/cookies.js"/>
 
   <stringbundle id="bundlePreferences"
                 src="chrome://browser/locale/preferences/preferences.properties"/>
 
   <keyset>
     <key key="&windowClose.key;" modifiers="accel" oncommand="window.close();"/>
     <key key="&focusSearch1.key;" modifiers="accel" oncommand="gCookiesWindow.focusFilterBox();"/>
-    <key key="&focusSearch2.key;" modifiers="accel" oncommand="gCookiesWindow.focusFilterBox();"/>
   </keyset>
 
   <vbox flex="1" class="contentPane largeDialogContainer">
     <hbox align="center">
       <textbox type="search" id="filter" flex="1"
                aria-controls="cookiesList"
                oncommand="gCookiesWindow.filter();"
                placeholder="&searchFilter.label;"
--- a/browser/components/preferences/in-content-new/main.js
+++ b/browser/components/preferences/in-content-new/main.js
@@ -397,18 +397,16 @@ var gMainPane = {
     this._prefSvc.addObserver(PREF_VIDEO_FEED_SELECTED_ACTION, this);
     this._prefSvc.addObserver(PREF_VIDEO_FEED_SELECTED_READER, this);
 
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_APP, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_WEB, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_ACTION, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_READER, this);
 
-    setEventListener("focusSearch1", "command", gMainPane.focusFilterBox);
-    setEventListener("focusSearch2", "command", gMainPane.focusFilterBox);
     setEventListener("filter", "command", gMainPane.filter);
     setEventListener("handlersView", "select",
       gMainPane.onSelectionChanged);
     setEventListener("typeColumn", "click", gMainPane.sort);
     setEventListener("actionColumn", "click", gMainPane.sort);
     setEventListener("chooseFolder", "command", gMainPane.chooseFolder);
     setEventListener("browser.download.dir", "change", gMainPane.displayDownloadDirPref);
     setEventListener("saveWhere", "command", gMainPane.handleSaveToCommand);
--- a/browser/components/preferences/in-content-new/main.xul
+++ b/browser/components/preferences/in-content-new/main.xul
@@ -641,23 +641,16 @@
           label="&checkUserSpelling.label;"
           accesskey="&checkUserSpelling.accesskey;"
           onsyncfrompreference="return gMainPane.readCheckSpelling();"
           onsynctopreference="return gMainPane.writeCheckSpelling();"
           preference="layout.spellcheckDefault"/>
 </groupbox>
 
 <!-- Files and Applications -->
-<keyset data-category="paneGeneral">
-  <!-- Ctrl+f/k focus the search box in the Applications pane.
-       These <key>s have oncommand attributes because of bug 371900. -->
-  <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
-  <key key="&focusSearch2.key;" modifiers="accel" id="focusSearch2" oncommand=";"/>
-</keyset>
-
 <hbox id="filesAndApplicationsCategory"
       class="subcategory"
       hidden="true"
       data-category="paneGeneral">
   <label class="header-name" flex="1">&filesAndApplications.label;</label>
 </hbox>
 
 <!--Downloads-->
--- a/browser/components/preferences/in-content-new/preferences.xul
+++ b/browser/components/preferences/in-content-new/preferences.xul
@@ -167,20 +167,17 @@
                     tooltiptext="&paneSync1.title;"
                     align="center">
         <image class="category-icon"/>
         <label class="category-name" flex="1">&paneSync1.title;</label>
       </richlistitem>
     </richlistbox>
 
     <keyset>
-      <!-- Disable the findbar because it doesn't work properly.
-           Remove this keyset once bug 1094240 ("disablefastfind" attribute
-           broken in e10s mode) is fixed. -->
-      <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
+      <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand="gSearchResultsPane.searchInput.focus();"/>
     </keyset>
 
     <html:a class="help-button" target="_blank" aria-label="&helpButton2.label;">&helpButton2.label;</html:a>
 
     <vbox class="main-content" flex="1">
       <vbox class="pane-container">
         <hbox class="search-container" pack="end">
           <textbox type="search" id="searchInput" hidden="true" clickSelectsAll="true"/>
--- a/browser/components/preferences/in-content/applications.js
+++ b/browser/components/preferences/in-content/applications.js
@@ -897,19 +897,16 @@ var gApplicationsPane = {
     this._prefSvc.addObserver(PREF_VIDEO_FEED_SELECTED_ACTION, this);
     this._prefSvc.addObserver(PREF_VIDEO_FEED_SELECTED_READER, this);
 
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_APP, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_WEB, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_ACTION, this);
     this._prefSvc.addObserver(PREF_AUDIO_FEED_SELECTED_READER, this);
 
-
-    setEventListener("focusSearch1", "command", gApplicationsPane.focusFilterBox);
-    setEventListener("focusSearch2", "command", gApplicationsPane.focusFilterBox);
     setEventListener("filter", "command", gApplicationsPane.filter);
     setEventListener("handlersView", "select",
       gApplicationsPane.onSelectionChanged);
     setEventListener("typeColumn", "click", gApplicationsPane.sort);
     setEventListener("actionColumn", "click", gApplicationsPane.sort);
 
     // Listen for window unload so we can remove our preference observers.
     window.addEventListener("unload", this);
--- a/browser/components/preferences/in-content/applications.xul
+++ b/browser/components/preferences/in-content/applications.xul
@@ -47,23 +47,16 @@
               name="browser.audioFeeds.handlers.webservice"
               type="string"/>
 
   <preference id="pref.downloads.disable_button.edit_actions"
               name="pref.downloads.disable_button.edit_actions"
               type="bool"/>
 </preferences>
 
-<keyset data-category="paneApplications">
-  <!-- Ctrl+f/k focus the search box in the Applications pane.
-       These <key>s have oncommand attributes because of bug 371900. -->
-  <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
-  <key key="&focusSearch2.key;" modifiers="accel" id="focusSearch2" oncommand=";"/>
-</keyset>
-
 <hbox id="header-applications"
       class="header"
       hidden="true"
       data-category="paneApplications">
   <label class="header-name" flex="1">&paneApplications.title;</label>
   <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
 </hbox>
 
--- a/browser/locales/en-US/chrome/browser/preferences-old/applications.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences-old/applications.dtd
@@ -4,11 +4,10 @@
 
 <!ENTITY  typeColumn.label        "Content Type">
 <!ENTITY  typeColumn.accesskey    "T">
 
 <!ENTITY  actionColumn2.label     "Action">
 <!ENTITY  actionColumn2.accesskey "A">
 
 <!ENTITY  focusSearch1.key        "f">
-<!ENTITY  focusSearch2.key        "k">
 
 <!ENTITY  filter.emptytext        "Search">
--- a/browser/locales/en-US/chrome/browser/preferences/applications.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/applications.dtd
@@ -6,12 +6,9 @@
 <!ENTITY  applications.description "Choose how &brandShortName; handles the files you download from the web or the applications you use while browsing.">
 
 <!ENTITY  typeColumn.label        "Content Type">
 <!ENTITY  typeColumn.accesskey    "T">
 
 <!ENTITY  actionColumn2.label     "Action">
 <!ENTITY  actionColumn2.accesskey "A">
 
-<!ENTITY  focusSearch1.key        "f">
-<!ENTITY  focusSearch2.key        "k">
-
 <!ENTITY  filter2.emptytext        "Search file types or applications">
--- a/browser/locales/en-US/chrome/browser/preferences/cookies.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/cookies.dtd
@@ -14,15 +14,14 @@
 <!ENTITY     props.path.label               "Path:">
 <!ENTITY     props.secure.label             "Send For:">
 <!ENTITY     props.expires.label            "Expires:">
 <!ENTITY     props.container.label          "Container:">
 
 <!ENTITY     window.title                   "Cookies">
 <!ENTITY     windowClose.key                "w">
 <!ENTITY     focusSearch1.key               "f">
-<!ENTITY     focusSearch2.key               "k">
 
 <!ENTITY     searchFilter.label             "Search">
 <!ENTITY     searchFilter.accesskey         "S">
 
 <!ENTITY     button.close.label             "Close">
 <!ENTITY     button.close.accesskey         "C">