summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 07:25:09 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 07:25:09 +0200
commit4678680983c53e28371ab2a5d0524ab63cbed4b0 (patch)
treefc40b66c8218d70f90c1c9d4d67f6da7668f81d7 /application/palemoon
parenteebf4162a992bd0cc70f9c58bbb6e543b0438c89 (diff)
downloadUXP-4678680983c53e28371ab2a5d0524ab63cbed4b0.tar
UXP-4678680983c53e28371ab2a5d0524ab63cbed4b0.tar.gz
UXP-4678680983c53e28371ab2a5d0524ab63cbed4b0.tar.lz
UXP-4678680983c53e28371ab2a5d0524ab63cbed4b0.tar.xz
UXP-4678680983c53e28371ab2a5d0524ab63cbed4b0.zip
Bug 661831 - In about:permissions, make Ctrl+f focus the filter box instead of invoking the find bar
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/components/preferences/aboutPermissions.js21
-rw-r--r--application/palemoon/components/preferences/aboutPermissions.xul4
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd2
3 files changed, 23 insertions, 4 deletions
diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js
index 484758148..db717e1c6 100644
--- a/application/palemoon/components/preferences/aboutPermissions.js
+++ b/application/palemoon/components/preferences/aboutPermissions.js
@@ -483,6 +483,14 @@ var AboutPermissions = {
*/
_sites: {},
+ /**
+ * Using a getter for sitesFilter to avoid races with tests.
+ */
+ get sitesFilter () {
+ delete this.sitesFilter;
+ return this.sitesFilter = document.getElementById("sites-filter");
+ },
+
sitesList: null,
_selectedSite: null,
@@ -949,8 +957,7 @@ var AboutPermissions = {
aSite.listitem = item;
// Make sure to only display relevant items when list is filtered.
- let filterValue =
- document.getElementById("sites-filter").value.toLowerCase();
+ let filterValue = this.sitesFilter.value.toLowerCase();
item.collapsed = aSite.host.toLowerCase().indexOf(filterValue) == -1;
(this._listFragment || this.sitesList).appendChild(item);
@@ -973,8 +980,7 @@ var AboutPermissions = {
*/
filterSitesList: function() {
let siteItems = this.sitesList.children;
- let filterValue =
- document.getElementById("sites-filter").value.toLowerCase();
+ let filterValue = this.sitesFilter.value.toLowerCase();
if (filterValue == "") {
for (let i = 0, iLen = siteItems.length; i < iLen; i++) {
@@ -1350,6 +1356,13 @@ var AboutPermissions = {
window.openDialog("chrome://browser/content/preferences/cookies.xul",
"Browser:Cookies", "", {filterString : selectedDomain});
}
+ },
+
+ /**
+ * Focusses the filter box.
+ */
+ focusFilterBox: function() {
+ this.sitesFilter.focus();
}
}
diff --git a/application/palemoon/components/preferences/aboutPermissions.xul b/application/palemoon/components/preferences/aboutPermissions.xul
index 279de8d9b..7ecc7e11d 100644
--- a/application/palemoon/components/preferences/aboutPermissions.xul
+++ b/application/palemoon/components/preferences/aboutPermissions.xul
@@ -25,6 +25,10 @@
<script type="application/javascript"
src="chrome://browser/content/preferences/aboutPermissions.js"/>
+ <keyset>
+ <key key="&focusSearch.key;" modifiers="accel" oncommand="AboutPermissions.focusFilterBox();"/>
+ </keyset>
+
<hbox flex="1" id="permissions-header">
<label id="permissions-pagetitle">&permissionsManager.title;</label>
</hbox>
diff --git a/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd b/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
index 731be8fe5..c6c48de7e 100644
--- a/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
+++ b/application/palemoon/locales/en-US/chrome/browser/preferences/aboutPermissions.dtd
@@ -56,3 +56,5 @@
<!ENTITY pointerLock.label "Hide the Mouse Pointer">
<!ENTITY push.label "Receive Push Notifications">
+
+<!ENTITY focusSearch.key "f">