diff --git a/src/hotkeys.service.ts b/src/hotkeys.service.ts index 6c9aa32..aad08be 100644 --- a/src/hotkeys.service.ts +++ b/src/hotkeys.service.ts @@ -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).allowIn.indexOf(nodeName) === -1) { + } else if(this._preventIn.indexOf(nodeName) > -1 && (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; }