Skip to content

Commit

Permalink
Adjust method name
Browse files Browse the repository at this point in the history
  • Loading branch information
fgr-araujo committed Jun 23, 2018
1 parent 08ece9d commit bcbf4dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ if (process && process.env && process.env.NODE_ENV !== 'test') {
;(function () {
document.addEventListener('keydown', (pKey) => {
const decodedKey = ShortKey.decodeKey(pKey)

// Check evict
if (filteringElement(pKey)) {
// Check avoidable elements
if (availableElement(decodedKey)) {
pKey.preventDefault()
pKey.stopPropagation()
if (mapFunctions[decodedKey].focus) {
Expand All @@ -131,7 +130,7 @@ if (process && process.env && process.env.NODE_ENV !== 'test') {

document.addEventListener('keyup', (pKey) => {
const decodedKey = ShortKey.decodeKey(pKey)
if (filteringElement(pKey)) {
if (availableElement(decodedKey)) {
pKey.preventDefault()
pKey.stopPropagation()
if (mapFunctions[decodedKey].once || mapFunctions[decodedKey].push) {
Expand Down

0 comments on commit bcbf4dc

Please sign in to comment.