Search code examples
javascriptinternet-explorerautocomplete

autoComplete.js Uncaught (in promise) undefined and can't select autocomplete result on IE 11


I'm using the autoComplete.Js library for my project. But I need it to work on IE11. I added the missing polyfills to make it work properly but I still get an issue.

Autocomplete results should disappear by clicking on it and fill in the input with the selected result (classic autocomplete behavior).

On IE11, clicking on a result doesn't do anything.

The library provides a way to handle "selection"

onSelection: feedback => {             // Action script onSelection event | (Optional)
        console.log(feedback.selection.value.image_url);
    }

I use it the same way but I got a console error on IE11:

Uncaught (in promise) undefined

I tried to comment the onSelection part, I don't get the error but still can't select any result.

Is there any workaround I'm missing ?


Solution

  • Check the package browser support:

    https://tarekraafat.github.io/autoComplete.js/#/?id=_4-browsers-support

    They do not claim to support IE11. Try different library or ask them for support. maybe they know a way to solve it