bevacqua / horsey

:horse: Progressive and customizable autocomplete component
https://bevacqua.github.io/horsey
MIT License
1.17k stars 98 forks source link

No suggestions on IE11 #43

Open waht opened 8 years ago

waht commented 8 years ago

On Internet Explorer 11 horsey fails to display suggestions. The developer console shows that on line 365 parent is undefined (an exception is thrown).

364:      for (let char of text) {
365:        parent.insertBefore(spanFor(char), el);
366:      }

I found out that document.createTreeWalker as used in getTextChildren is unsupported by IE (all versions according to MDN: https://developer.mozilla.org/de/docs/Web/API/Document/createTreeWalker). This seems to lead to parent being undefined.

korywka commented 8 years ago

confirm. broken on ie.

backflip commented 8 years ago

I have opened a PR fixing IE9+: https://github.com/bevacqua/horsey/pull/50