summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-ctrlTab.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/browser-ctrlTab.js')
-rw-r--r--browser/base/content/browser-ctrlTab.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/browser/base/content/browser-ctrlTab.js b/browser/base/content/browser-ctrlTab.js
index 31617f13a3..d4d79a6886 100644
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -581,7 +581,7 @@ var ctrlTab = {
return;
}
- Services.els.addSystemEventListener(document, "keyup", this, false);
+ document.addEventListener("keyup", this, { mozSystemGroup: true });
let tabs = gBrowser.visibleTabs;
if (tabs.length > 2) {
@@ -706,12 +706,7 @@ var ctrlTab = {
event.stopPropagation();
if (event.keyCode === event.DOM_VK_CONTROL) {
- Services.els.removeSystemEventListener(
- document,
- "keyup",
- this,
- false
- );
+ document.removeEventListener("keyup", this, { mozSystemGroup: true });
if (this.isOpen) {
this.pick();
@@ -787,9 +782,9 @@ var ctrlTab = {
tabContainer[toggleEventListener]("TabShow", this);
if (enable) {
- Services.els.addSystemEventListener(document, "keydown", this, false);
+ document.addEventListener("keydown", this, { mozSystemGroup: true });
} else {
- Services.els.removeSystemEventListener(document, "keydown", this, false);
+ document.removeEventListener("keydown", this, { mozSystemGroup: true });
}
document[toggleEventListener]("keypress", this);
gBrowser.tabbox.handleCtrlTab = !enable;