Index: chrome/content/ui/filters-filteractions.js |
=================================================================== |
--- a/chrome/content/ui/filters-filteractions.js |
+++ b/chrome/content/ui/filters-filteractions.js |
@@ -21,21 +21,17 @@ |
*/ |
var FilterActions = |
{ |
/** |
* Initializes filter actions. |
*/ |
init: function() |
{ |
- let me = this; |
- this.treeElement.parentNode.addEventListener("keypress", function(event) |
- { |
- me.keyPress(event); |
- }, true); |
+ this.treeElement.parentNode.addEventListener("keydown", this.keyDown.bind(this), true); |
this.treeElement.view = FilterView; |
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=777832, don't |
// allow the tree to receive keypress/keydown events triggered by cursor |
// keys pressed in the editor, it will call preventDefault() on them. |
let propagationStopper = function(event) |
{ |
if (event.keyCode >= event.DOM_VK_PAGE_UP && event.keyCode <= event.DOM_VK_DOWN) |
@@ -368,17 +364,17 @@ var FilterActions = |
E("tooltip-additional").textContent = Utils.getString("filter_regexp_tooltip"); |
else |
E("tooltip-additional").hidden = true; |
}, |
/** |
* Called whenever a key is pressed on the list. |
*/ |
- keyPress: function(/**Event*/ event) |
+ keyDown: function(/**Event*/ event) |
{ |
if (event.target != E("filtersTree")) |
return; |
let modifiers = 0; |
if (event.altKey) |
modifiers |= SubscriptionActions._altMask; |
if (event.ctrlKey) |