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

[Form, Dropdown] Formvalidation broke when id has colon in it #286

Conversation

lubber-de
Copy link
Member

Description

This is due to the use of jquery's .filter or .find dom selector mechanism
FUI already implemented an escaping function to mask special characters, but some of them were missing.

I also slightly optimized the get.field function to not quering the dom twice. Might be just a few milliseconds, but every performance optimation counts 😆

Testcase

Unfixed (open console, you'll see a jquery error when running the fiddle)

https://jsfiddle.net/h6sxdr1f/

Fixed (No console error and the value is set to the field as expected)

https://jsfiddle.net/h6sxdr1f/1/

Closes

Semantic-Org/Semantic-UI#6701

…find to support values containing :,=@. Broke otherwise. Also optimized form field fetching to reduce CPU time
@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews 🔧 refactor tag/sui-issue Taken from an existing Issue/PR of SUI labels Dec 4, 2018
Copy link
Member

@y0hami y0hami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@prudho prudho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@y0hami y0hami merged commit 9c0900c into fomantic:develop Dec 5, 2018
@y0hami y0hami removed the state/awaiting-reviews Pull requests which are waiting for reviews label Dec 5, 2018
@lubber-de lubber-de deleted the fix/6701/mask_special_chars_in_jquery_filter branch December 5, 2018 11:20
@lubber-de lubber-de added this to the 2.7.0 milestone Dec 5, 2018
This was referenced Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript tag/sui-issue Taken from an existing Issue/PR of SUI type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants