开发者

jQuery tokeninput plugin, problem when returning results with 1 char digit

Does anyone use jquery tokeninput plugin for tag autocmpletition?

I have a problem, when i digit the first char in input search starts and results are ok, but dropdown autocompletition doesn't shows me results and shows me no results text, in firebug console i see :

error: invalid quantifier on plugin line 661.

if i digit more then 1开发者_C百科 char everything is ok

what should be?


This is a bug with the plugin. The plugin in the source does a RegExp on the propertyToSearch. If the property has characters which are keywords in the RegExp then because the RegExp fails, the addition also fails. I tried working around with 'onResult' callback but wasn't successful. So, I changed my data and removed any '+', '/', '?' etc which might conflict with regexp.

Hope it helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜