Mobius1 / Selectr

A lightweight, vanilla javascript select box replacement. No dependencies.
MIT License
313 stars 77 forks source link

IE bug: non-native listbox always showing the "No results." notice #139

Open dgervalle opened 5 years ago

dgervalle commented 5 years ago

IE does not support childElementCount on document fragment (see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10060579/), causing the test on line 2038 to always fail. Highlight first selected option with test on line 258, should also fail due to the same issue (untested).

Here is a polyfill for that issue: https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/childElementCount#Polyfill_for_IE8_IE9_Safari