From 8e2c1b56e155e4463e3bdbd8acedba0a0f2d6d46 Mon Sep 17 00:00:00 2001 From: Inside Date: Thu, 9 May 2019 12:58:11 +0800 Subject: [PATCH] feat: modify filter function on readOnly element (#73) --- dist/hotkeys.common.js | 10 ++++++++-- dist/hotkeys.common.min.js | 2 +- dist/hotkeys.esm.js | 10 ++++++++-- dist/hotkeys.js | 10 ++++++++-- dist/hotkeys.min.js | 2 +- src/main.js | 13 +++++++++++-- test/run.test.js | 14 ++++++++++++++ 7 files changed, 51 insertions(+), 10 deletions(-) diff --git a/dist/hotkeys.common.js b/dist/hotkeys.common.js index e9607f3..472bc41 100644 --- a/dist/hotkeys.common.js +++ b/dist/hotkeys.common.js @@ -159,13 +159,19 @@ function getScope() { function getPressedKeyCodes() { return _downKeys.slice(0); } // 表单控件控件判断 返回 Boolean +// hotkey is effective only when filter return true function filter(event) { var target = event.target || event.srcElement; - var tagName = target.tagName; // 忽略这些情况下快捷键无效 + var tagName = target.tagName; + var flag = true; // ignore: isContentEditable === 'true', and