react-shortcuts icon indicating copy to clipboard operation
react-shortcuts copied to clipboard

IE11: Exceptions thrown due to missing CustomEvent

Open forum-is opened this issue 7 years ago • 2 comments

CustomEvent is not available in IE11 which causes the Shortcuts component to malfunction by throwing an unhandled exception on each keypress, leading to a massive slowdown when typing (as well as the shortcuts not working, of course). 😉

We were able to remedy the problem by supplying the polyfill for IE described here: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

There is also an npm package that should fix this issue easily (untested): https://github.com/krambuhl/custom-event-polyfill

Could you include the polyfill for the next release? Thanks!

forum-is avatar Apr 25 '17 11:04 forum-is

@forum-is Thanks for pointing out this issue. I'm thinking if we should include the polyfill directly in or just highlight the problem in the README.

petrbrzek avatar Apr 26 '17 09:04 petrbrzek

We'd very much prefer including the polyfill as it is tiny and avoids the nasty exceptions in IE11.

forum-is avatar Apr 26 '17 11:04 forum-is