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

Highlight deletes characters on match double-up #1142

Closed

Description

@Wardrop

Another highlighting related issue in the master branch. This is best explained with an example, included below. With the blow example, if you type "Isabel", everything is good, but when you start typing the "S" for street (i.e. "Isabel S"), the second "S" rematches the with the "s" in "Isabel". If you continue typing the "t" (i.e. "Isabel St"), the "sabel" is deleted. The whole issue seems to be caused by the fact that highlighting is being applied to already matched words, causing this kind of weirdness.

See related issues #1141 and #1098.

<select id="select-test">
    <option value="">Select a country...</option>
    <option value="AL">Isabel Street</option>
</select>
$('#select-test').selectize();

Activity

  1. Wardrop commented on Aug 24, 2016

    @Wardrop
    Author

    For the moment, for anyone else looking for a work-around, I'm using mark.js.

    $('#selector').selectize({
      // ...
      highlight: false,
      onType: function (value) {
        $(".selectize-dropdown-content").unmark().mark(value, {exclude: ['.exclude']});
      }
      // ...
    })
  2. added this to the 0.13.0 milestone on Aug 24, 2016
  3. added a commit that references this issue on Nov 4, 2016
  4. added a commit that references this issue on Nov 16, 2016
  5. added a commit that references this issue on Nov 17, 2016
  6. risadams commented on Nov 12, 2020

    @risadams
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions