darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

IE11/EDGE js errors on scrolling & selecting item in list via keys #80

Closed dz000 closed 5 years ago

dz000 commented 5 years ago

Added vue-autosuggest to nuxt project.

What happened: Scrolling on key down/up & selecting item via enter key doesn't work properly in IE11 & EDGE Scrolling on key down/up throws errors if scrolling a list with items hidden in overflow: Error Message: Object doesn't support property or method scrollTo

Reproduction repository: Storybook of vue-autosuggest: https://educents.github.io/vue-autosuggest/storybook/

Problem description: Maybe: https://stackoverflow.com/questions/51517324/scrollto-method-doesnt-work-in-edge

Suggested solution: Can you have a look at the problem? Was it the intention to support internet explorer?

Thank you!

scottadamsmith commented 5 years ago

I had to use two polyfills for IE.

Object.assign(): There is one directly in the documentation here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign

For scrollTo, I had to add to add the smooth scroll-polyfill library: https://github.com/iamdustan/smoothscroll

dz000 commented 5 years ago

@scottadamsmith Thank you very much for the quick answer! Will try those

dz000 commented 5 years ago

@scottadamsmith Thanks again - everything works now! IE11 & EDGE