selectize.js icon indicating copy to clipboard operation
selectize.js copied to clipboard

indexOf not working on IE8

Open rcarmonad opened this issue 11 years ago • 2 comments

Hi!

i'm using selectize in an old bank app. When trying to use on IE8 (minimal support) it crushes en two lines. The reason it's that IE8 not support indexOf(). (see this StackOverflow post) Adn, Yes, i'm using es5-sham.js. Also, i'm using jquery 1.11.3 (because IE8)

The correction was done using inArray of JQuery (Also included in StackOverflow post):

    // Line 2488
    //  if (self.items.indexOf(value) !== -1) {
    if ($.inArray(value, self.items) !== -1) {

...

    // Line 872
    //  if (types.indexOf(type) !== -1) {
    if ($.inArray(type, types) !== -1) {

If there's another solution, i'll be happy to know about it.

Greets.

rcarmonad avatar Jul 20 '15 15:07 rcarmonad

Since this pull request, may be, this is not at an issue and it's a workaround when someone (like me) have to use selectize on IE8.

rcarmonad avatar Jul 21 '15 17:07 rcarmonad

closing stale issues older than one year. If this issue was closed in error please message the maintainers. All issues must include a proper title, description, and examples.

risadams avatar Nov 12 '20 12:11 risadams