Closed
Conversation
|
Changes Unknown when pulling d29777c on fkaempfer:master into * on selectize:master*. |
Member
|
Can you point to an example id where that would be the case? |
Author
|
Sure. One of the most popular Java web frameworks (JSF) creates IDs separated by ":" depending on their position in the DOM, for example "myForm:mySelectField". The ":" causes an exception in the label selector code. |
Member
Given I have a label and input field with id 'form:name'
When I selectize this field
Then the resulting field should have id 'form:name-selectized'
And the label should have attr for 'form:name-selectized'As I understand, that's not currently the case? |
Member
|
Got it. That said, there's an even easier fix: http://stackoverflow.com/q/9763323/720164 - $('label[for='+inputId+']').attr('for', inputId + '-selectized');
+ $("label[for='"+inputId+"']").attr('for', inputId + '-selectized');I can let you commit that if you want the credit ;o) |
Author
|
Great, yeah that is much simpler. I checked that it works in my case. No need to give me credit, but if it makes it easier for you to integrate the fix I can update the PR. Thanks! |
Member
|
Fixed, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small problem caused by #755 as it does not escape CSS notation within the id attribute properly. Compare: https://learn.jquery.com/using-jquery-core/faq/how-do-i-select-an-element-by-an-id-that-has-characters-used-in-css-notation/