Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highlight not working after first highlight insert #1098 #1099

Closed
wants to merge 1 commit into from

Conversation

skimi
Copy link
Contributor

@skimi skimi commented Jul 2, 2016

The highlight did not work correctly after the first highlight happened. Most likely it would only highlight the first letter.

Newer version of the highlight function have added a removeHighlight() function that allows to reset the strings between each highlights and then getting a good result.

Problem, that version does not use Regexp to match the highlight anymore and their file does not pass the strict mode as is so it can't be commited to selectize.

It's a bit weird to have that contrib commited into the repo. I don't know if it's wise to edit it in our code or not or to update it or to remove it, or... So I've just made the minimal changes to fix the issue without changing much. I've copied their removeHighlight() fn and edited it to pass strict mode.

From issue #1098

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8d2d76b on skimi:master into * on selectize:master*.

@joallard joallard added this to the 0.12.3 milestone Jul 4, 2016
@joallard
Copy link
Member

joallard commented Jul 4, 2016

Thanks, I'll look it over!

@groovenectar
Copy link

I tried this patch. In my case it seems to work well even on a ~4900 item list. Thanks!

@vedmaka
Copy link

vedmaka commented Jul 14, 2016

👍 please merge, encountered this issue recently too

joallard added a commit that referenced this pull request Jul 20, 2016
joallard added a commit that referenced this pull request Jul 20, 2016
@joallard
Copy link
Member

Merged thanks

@joallard joallard closed this Jul 20, 2016
bwilson-ux pushed a commit to bwilson-ux/selectize.js that referenced this pull request Oct 4, 2016
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.

5 participants