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

[Dropdown] Backslash \ breaks multiple dropdown #4688

Closed
AgileJoshua opened this issue Oct 24, 2016 · 3 comments
Closed

[Dropdown] Backslash \ breaks multiple dropdown #4688

AgileJoshua opened this issue Oct 24, 2016 · 3 comments
Milestone

Comments

@AgileJoshua
Copy link

AgileJoshua commented Oct 24, 2016

JSfiddle: https://jsfiddle.net/agilejoshua/c24s8hdp/1/

When an option in a multiple select dropdown contains a backslash in the value then once it has been selected it stays visible (as if it where selected) even when it has been removed. The "get value" behavior of the dropdown is correct but the UI doesn't remove the item from the selected field.

@jlukic jlukic added this to the 2.2.6 milestone Oct 25, 2016
@jlukic
Copy link
Member

jlukic commented Oct 25, 2016

Can confirm, thanks!

@jlukic jlukic modified the milestones: 2.2.6, 2.2.7, 2.2.8 Oct 28, 2016
@jaideeprana
Copy link

The issue lies in the code '$removedLabel = $labels.filter('[data-value="' + value +'"]')', its line no. 7061 of semantic.js(version 2.2.6). '' seems to have special meaning because of which filter on labels returns an empty array. The following code fixes it: '$removedLabel = $labels.filter('[data-value="' + value.replace(//g, "\") +'"]')'. Appending an extra '' escapes the ''.
As I applied this solution on semantic.js located in dist folder and not on the src files, I will apply it and send a pull request for the fix for revision.

@jlukic jlukic changed the title Backslash \ breaks multiple dropdown [Dropdown] Backslash \ breaks multiple dropdown Feb 20, 2017
@jlukic jlukic modified the milestones: 2.2.8, 2.2.9 Feb 21, 2017
jlukic added a commit that referenced this issue Feb 21, 2017
jlukic added a commit that referenced this issue Feb 21, 2017
@jlukic jlukic closed this as completed Feb 21, 2017
@jlukic
Copy link
Member

jlukic commented Feb 21, 2017

Fixed in 2.2.8

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

No branches or pull requests

3 participants