optimistex / ngx-select-ex

Angular based replacement for select boxes
https://optimistex.github.io/ngx-select-ex/
MIT License
111 stars 42 forks source link

keyboardevent-code is not supported in IE due to which key navigation does not work #146

Open ghost opened 5 years ago

ghost commented 5 years ago

Referring: https://caniuse.com/#feat=keyboardevent-code, IE lack keyboardevent-code support yet.

Solution - tried using: let code1 = ''; if (!event.code) { if (event.keyCode) { if (event.keyCode === 40) { code1 = 'ArrowDown'; } else if (event.keyCode === 38) { code1 = 'ArrowUp'; } } } else { code1 = event.code; }

So need fixes or if poly-fill can be used. Please let me know, if I can raise a PR for the same.

platzhersh commented 5 years ago

I found out this polyfill here helps: https://github.com/inexorabletash/polyfill/blob/master/keyboard.md