Hi, I think I was able to reproduce the same (or at least similar) behavior as reported in this bug:
JsFiddle Sample
Start searching 'Some Text'
Select that option (everything behaves normal)
Start searching 'Some Text With (parenthesis)'
Select that option
Start deleting the input using backspace (from the end), it raises this exception:
jquery.flexdatalist.min.js:2 Uncaught SyntaxError: Invalid regular expression: /Another Text With (parenth/: Unterminated group
at new RegExp (<anonymous>)
at Object.highlight (jquery.flexdatalist.min.js:2)
at Object.matches (jquery.flexdatalist.min.js:2)
at Object.get (jquery.flexdatalist.min.js:2)
at jquery.flexdatalist.min.js:2
at jquery.flexdatalist.min.js:2
at Object.datalist (jquery.flexdatalist.min.js:2)
at jquery.flexdatalist.min.js:2
at Object.static (jquery.flexdatalist.min.js:2)
at jquery.flexdatalist.min.js:2
jquery: v3.3.1
jquery-flexdatalist: v2.2.4
The problem seems to be when using the 'searchContain: true', where the regexs are used, and maybe the parenthesis characteres are not being escaped correctly.
Hi, I think I was able to reproduce the same (or at least similar) behavior as reported in this bug: JsFiddle Sample
jquery: v3.3.1 jquery-flexdatalist: v2.2.4
The problem seems to be when using the 'searchContain: true', where the regexs are used, and maybe the parenthesis characteres are not being escaped correctly.
Hope this helps.
Thanks @sergiodlopes for a great plugin!