Skip to content

ie 8 compatibility, replace indexOf method#46

Merged
timschlechter merged 1 commit into
mdbootstrap:masterfrom
hueitan:patch-1
Oct 30, 2013
Merged

ie 8 compatibility, replace indexOf method#46
timschlechter merged 1 commit into
mdbootstrap:masterfrom
hueitan:patch-1

Conversation

@hueitan
Copy link
Copy Markdown
Contributor

@hueitan hueitan commented Oct 30, 2013

No description provided.

timschlechter added a commit that referenced this pull request Oct 30, 2013
ie 8 compatibility, replace indexOf method
@timschlechter timschlechter merged commit cf0b5e6 into mdbootstrap:master Oct 30, 2013
@timschlechter
Copy link
Copy Markdown
Contributor

Thanks!

@hueitan hueitan deleted the patch-1 branch October 30, 2013 17:17
@aolee
Copy link
Copy Markdown

aolee commented Feb 4, 2014

The fix in this commit for src/bootstrap-tagsinput.js on line 278 is still not working in IE8,

return ($.inArray(this.query.trim().toLowerCase(), text.toLowerCase()) !== -1);
or
return (text.toLowerCase().indexOf(this.query.trim().toLowerCase()) !== -1);

change it to this

var regex = new RegExp( '(' + $.trim(this.query) + ')', 'gi' );
return regex.test(text);

@PedroGabriel
Copy link
Copy Markdown

Hm
ie 8 compatibility, replace indexOf method
ie 8 compatibility? it does not work in here because of 'this' keyword... Is it normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants