ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 122 forks source link

Support IE11 when `ignore-accents` is true #359

Open gerardobot opened 5 years ago

gerardobot commented 5 years ago

IE11 doesn't support String.prototype.normalize. unorm package is now used when normalize is not available

almothafar commented 5 years ago

Thanks for PR, actually I'm not sure if that's worth it to support IE that almost no more used it is just 2.44% usage, and unorm looks like outdated abandoned dep.

Also, we got version 2.0.0 and there is a conflict to be solved.

gerardobot commented 5 years ago

I dont pay much attention to IE11, that is why I did not noticed the problem earlier; but I work with different Spanish insurance, energy and banking companies that seem to have a fetish for outdated software and want everything to be compatible with IE11. I modified the component so that I could use it while sticking to their requirements, and I thought that others could benefit from this. But I understand your reservations.

I wrote the code so that unorm was only used with IE11; so even in the unlikely scenario that it breaks with future updates, it would only affect a use case which is already non supported. That said, I understand not wanting to include extra dependencies just to support IE11. In any case, now you know there is a solution if you ever want to bring back IE11 support.

Cheers!

Lramelot commented 5 years ago

IE is the most used browser in large public company due to its deep integration with Windows Authentication. I encountered the same issue.

If you do not want to include unorm in this package, you could at least specify that including unorm in the polyfill.ts can fix the behavior for IE11+. :)