From 0d6ff9efcb7bd2b5e5d56ab9b386627fd010c1b1 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 9 Sep 2015 14:14:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dkeydown=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=9A=84event=E5=8F=82=E6=95=B0=E4=B8=BA=E4=BC=A0=E9=80=92?= =?UTF-8?q?=E7=BB=99eventHandler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hotkeys.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hotkeys.js b/src/hotkeys.js index 7059044..a04217c 100644 --- a/src/hotkeys.js +++ b/src/hotkeys.js @@ -111,7 +111,7 @@ if(!Array.indexOf){ //对任何按键做处理 if(asterisk) for (i = 0; i < asterisk.length; i++) { - if(asterisk[i].scope === scope) eventHandler(asterisk[i],scope); + if(asterisk[i].scope === scope) eventHandler(event,asterisk[i],scope); } // key 不在_handlers中返回 @@ -119,11 +119,11 @@ if(!Array.indexOf){ for (i = 0; i < _handlers[key].length; i++) { //找到处理内容 - eventHandler(_handlers[key][i],scope); + eventHandler(event,_handlers[key][i],scope); } } - function eventHandler(handler,scope){ + function eventHandler(event,handler,scope){ var modifiersMatch; //看它是否在当前范围 if(handler.scope === scope || handler.scope === 'all'){