diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 8341eaf72..1a5e26359 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -187,7 +187,7 @@ window.keydownEvent = (key, properties={}) -> nativeProperties.alt = properties.altKey nativeProperties.shift = properties.shiftKey nativeProperties.cmd = properties.metaKey - nativeProperties.target = properties.target + nativeProperties.target = properties.target?[0] ? properties.target nativeProperties.which = properties.which originalEvent = nativeKeydownEvent(key, nativeProperties) properties = $.extend({originalEvent}, properties)