oliviertassinari/react-event-listener

Keypress doesn't work in Microsoft Edge

Closed this issue · 3 comments

Can't seem to make it work in Edge-browser.

<EventListener target='window' onKeyPress={this.handleDocumentClick} />

handleDocumentClick(e) {
  console.log(e) 
}

Works fine in Chrome & FF

The following code is working on my end with Edge 15. What version are you using? I'm not sure what's going on.

window.addEventListener('keypress', console.log)

Microsoft EdgeHTML 15.15063

Yes addEventListener works fine if I call it manually in my code or console but the EventListener-component doesn't seem to work for me.

I have no idea what could go wrong here. Sounds really weird! Did you get any other even type working? Let us know if you find a solution.