-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6fb2f3
commit 3dbe743
Showing
6 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.3.6 | ||
* hotkeys-js v3.3.7 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2018 kenny wong <[email protected]> | ||
|
@@ -151,9 +151,11 @@ function getPressedKeyCodes() { | |
|
||
// 表单控件控件判断 返回 Boolean | ||
function filter(event) { | ||
var tagName = event.target.tagName || event.srcElement.tagName; | ||
// 忽略这些标签情况下快捷键无效 | ||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA'); | ||
var target = event.target || event.srcElement; | ||
var tagName = target.tagName; | ||
// 忽略这些情况下快捷键无效 | ||
|
||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA' || target.isContentEditable); | ||
} | ||
|
||
// 判断摁下的键是否为某个键,返回true或者false | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.3.6 | ||
* hotkeys-js v3.3.7 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2018 kenny wong <[email protected]> | ||
|
@@ -149,9 +149,11 @@ function getPressedKeyCodes() { | |
|
||
// 表单控件控件判断 返回 Boolean | ||
function filter(event) { | ||
var tagName = event.target.tagName || event.srcElement.tagName; | ||
// 忽略这些标签情况下快捷键无效 | ||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA'); | ||
var target = event.target || event.srcElement; | ||
var tagName = target.tagName; | ||
// 忽略这些情况下快捷键无效 | ||
|
||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA' || target.isContentEditable); | ||
} | ||
|
||
// 判断摁下的键是否为某个键,返回true或者false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* hotkeys-js v3.3.6 | ||
* hotkeys-js v3.3.7 | ||
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. | ||
* | ||
* Copyright (c) 2018 kenny wong <[email protected]> | ||
|
@@ -155,9 +155,11 @@ | |
|
||
// 表单控件控件判断 返回 Boolean | ||
function filter(event) { | ||
var tagName = event.target.tagName || event.srcElement.tagName; | ||
// 忽略这些标签情况下快捷键无效 | ||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA'); | ||
var target = event.target || event.srcElement; | ||
var tagName = target.tagName; | ||
// 忽略这些情况下快捷键无效 | ||
|
||
return !(tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA' || target.isContentEditable); | ||
} | ||
|
||
// 判断摁下的键是否为某个键,返回true或者false | ||
|
Oops, something went wrong.