Skip to content

Entering in special chars in the search field cause it to select first category #103

Open

Description

@schaitanya

Steps to create:

  1. Type 8.25% in the text field. (You can also just type any special char anywhere like $ etc and hit enter)
  2. The text will disappear and the first category will show with empty value.

Expected behavior

  1. Show the entered text under 'text' category.

This can be seen on the demo page

Activity

  1. mewynn commented on Jul 10, 2014

    @mewynn

    You can fix this bug yourself :

    The problem is autocomplete menu is displayed if a category match the last word or if last word is empty. The regx that match last word in code doesn't work properly.

    Just replace :
    var lastWord = searchTerm.match(/\w+?$/); // Autocomplete only last word.
    by
    var lastWord = searchTerm.match(/[^\ ]
    $/); // Autocomplete only last word.

    on autocompleteValues function on SearchInput definition.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions