From 067f73da382dba1ca8cb6592d92a10787bcad649 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 14 Mar 2014 14:46:56 -0600 Subject: [PATCH] Defend against jQuery-wrapped targets in keydownEvent spec helper --- spec/spec-helper.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)