Skip to content

[Bug]: BaseAutocomplete console error on entering plus (+) #193

Open

Description

@dipbhi

Demo URL

https://tairo.cssninja.io/documentation/reference/forms/autocomplete#base-autocomplete-properties

What happened?

When you type a + key in the auto complete input box, it generates a console error, and the auto complete control becomes unusable.

Console error: SyntaxError: Invalid regular expression: /+/gi: Nothing to repeat (at BLiNDTvb.js:29:177635)

It seems to be generated because the code trying to highlight the results with the typed text is not escaping the + value when applying the regex.

Reproduction steps

1. Go to the demo URL
2. Type + in the input box
3. Check Developer Console for the error

Relevant log output

SyntaxError: Invalid regular expression: /+/gi: Nothing to repeat (at BLiNDTvb.js:29:177635)
    at new RegExp (<anonymous>)
    at BLiNDTvb.js:29:177635
    at cf.fn (BLiNDTvb.js:15:9212)
    at cf.run (BLiNDTvb.js:15:1517)
    at get value (BLiNDTvb.js:15:9457)
    at _ (BLiNDTvb.js:15:10406)
    at CgZnhkeA.js:1:2565
    at r (BLiNDTvb.js:19:3047)
    at Se (BLiNDTvb.js:19:20156)
    at BLiNDTvb.js:32:41805

What browsers are you seeing the problem on?

Chrome

What is your operating system?

Windows

Activity

  1. linear commented on Jul 14, 2024

    @linear
    CSS-26 [Bug]: BaseAutocomplete console error on entering plus (+)

    Demo URL

    https://tairo.cssninja.io/documentation/reference/forms/autocomplete#base-autocomplete-properties

    What happened?

    When you type a + key in the auto complete input box, it generates a console error, and the auto complete control becomes unusable.

    Console error: SyntaxError: Invalid regular expression: /+/gi: Nothing to repeat (at BLiNDTvb.js:29:177635)

    It seems to be generated because the code trying to highlight the results with the typed text is not escaping the + value when applying the regex.

    Reproduction steps

    1. Go to the demo URL
    2. Type + in the input box
    3. Check Developer Console for the error

    Relevant log output

    SyntaxError: Invalid regular expression: /+/gi: Nothing to repeat (at BLiNDTvb.js:29:177635)
        at new RegExp (<anonymous>)
        at BLiNDTvb.js:29:177635
        at cf.fn (BLiNDTvb.js:15:9212)
        at cf.run (BLiNDTvb.js:15:1517)
        at get value (BLiNDTvb.js:15:9457)
        at _ (BLiNDTvb.js:15:10406)
        at CgZnhkeA.js:1:2565
        at r (BLiNDTvb.js:19:3047)
        at Se (BLiNDTvb.js:19:20156)
        at BLiNDTvb.js:32:41805

    What browsers are you seeing the problem on?

    Chrome

    What is your operating system?

    Windows

  2. driss-chelouati commented on Sep 20, 2024

    @driss-chelouati
    Contributor

    This seems more like a Shuriken UI bug. Adding it to library issues.

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

    bugSomething isn't workingshuriken ui bugidentifies a shuriken ui bug to investigate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions