From e79fe062bc84b1530ec266a12f9323aa53cb89e4 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 3 Jun 2015 12:02:47 +0100 Subject: Fix tests for #1713... ... which is weird, because the tests are passing here. Let's see what Travis makes of this. --- content_scripts/mode.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index b2019ef9..cbcc15f7 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -50,11 +50,11 @@ class Mode # If options.suppressAllKeyboardEvents is truthy, then all keyboard events are suppressed. This avoids # the need for modes which block all keyboard events to 1) provide handlers for all keyboard events, # and 2) worry about their return value. - if options.suppressAllKeyboardEvents + if @options.suppressAllKeyboardEvents for type in [ "keydown", "keypress", "keyup" ] - do (type) -> - handler = options[type] - options[type] = (event) -> handler? event; false + do (type) => + handler = @options[type] + @options[type] = (event) -> handler? event; false @push keydown: @options.keydown || null -- cgit v1.2.3