Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

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

Closed
skimi wants to merge 1 commit into
selectize:masterfrom
skimi:master
Closed

Fix highlight not working after first highlight insert #1098#1099
skimi wants to merge 1 commit into
selectize:masterfrom
skimi:master

Conversation

@skimi
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Member

joallard commented Jul 4, 2016

Thanks, I'll look it over!

@groovenectar
Copy link
Copy Markdown

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

@vedmaka
Copy link
Copy Markdown

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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants