Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple abbr.search-choice-close #286

Closed
francescopellegrini opened this issue Oct 5, 2011 · 1 comment
Closed

Multiple abbr.search-choice-close #286

francescopellegrini opened this issue Oct 5, 2011 · 1 comment

Comments

@francescopellegrini
Copy link

When allow_single_deselect is true, there is no check whether or not abbr.search-choice-close element has already been added, thus ending up appending multiple copies of it.

Fix @l468, L653

var selectedOptionSpan = this.selected_item.find("span").first();
var maybeAbbr = selectedOptionSpan.siblings("abbr");

if ( maybeAbbr.length > 0 )
  maybeAbbr.detach();

selectedOptionSpan.after("<abbr class=\"search-choice-close\"></abbr>");
@pfiller
Copy link
Contributor

pfiller commented Oct 17, 2011

Thanks, @MrPelle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants