Skip to content

Commit

Permalink
Don't care about nodeName case for AllowIn. Fixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Richardson committed Jan 27, 2017
1 parent cf073f2 commit 5479ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotkeys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class HotkeysService {
// check if the input has a mousetrap class, and skip checking preventIn if so
if((' ' + target.className + ' ').indexOf(' mousetrap ') > -1) {
shouldExecute = true;
} else if(this._preventIn.indexOf(nodeName) > -1 && (<Hotkey>hotkey).allowIn.indexOf(nodeName) === -1) {
} else if(this._preventIn.indexOf(nodeName) > -1 && (<Hotkey>hotkey).allowIn.map(allow => allow.toUpperCase()).indexOf(nodeName) === -1) {
// don't execute callback if the event was fired from inside an element listed in preventIn but not in allowIn
shouldExecute = false;
}
Expand Down

0 comments on commit 5479ed0

Please sign in to comment.