Skip to content

Commit

Permalink
Merge pull request ivirabyan#44 from micobg/master
Browse files Browse the repository at this point in the history
Bugfix: deleting mentions, when they are more than one, lead to inconsistencies
  • Loading branch information
ivirabyan committed Sep 21, 2015
2 parents 467d718 + cd05aa8 commit 25dcdab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jquery.mentions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class MentionsInput extends MentionsBase
if not change.removed
cursor += change.count

for mention, i in @mentions[..]
for mention, i in @mentions[..] by -1
piece = value.substring(mention.pos, mention.pos + mention.name.length)
if mention.name != piece
@mentions.splice(i, 1)
Expand Down
2 changes: 1 addition & 1 deletion jquery.mentions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25dcdab

Please sign in to comment.