greena13/react-hotkeys

handlers not firing with version 0.9.0

stevewillard opened this issue · 2 comments

Using version 0.8.0, everything works great. When I upgrade to 0.9.0, I can't get any of my handlers to fire. Any idea why that might be?

Roughly my components look like this:

const keyMap = {
  onEnter: 'return'
};

const handlers = {
  onEnter: this.doStuff
};

<HotKeys keyMap={keyMap} handlers={handlers}>
    ...
</HotKeys>

I tried attached focused and attached={window} because I thought maybe they weren't in focus, but that didn't work, either.

Turns out it was because I had the following webpack plugin enabled:
https://github.com/lodash/lodash-webpack-plugin

I turned it off and everything worked fine.

Spent 2 hours on this, and I had the same exact problem.