ivirabyan / jquery-mentions

Adds mentioning support to your text fields.
http://ivirabyan.github.io/jquery-mentions/
MIT License
114 stars 49 forks source link

Bugfix: when add the same mention more than once position is not correct #43

Closed micobg closed 9 years ago

micobg commented 9 years ago

When you add some mention more than once, the position of all mentions except the first is incorrect. The reason is that every time indexOf() return the first occurrence of the mention. We can calculate the position, using position into formated text and length of all additional data used in previous mentions (5 special characters - @[]() and length of the uid).

ivirabyan commented 9 years ago

Thanks!