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

[GH-2090] [fluent-ui] fix: Text inputs render with invalid attribute #2206

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

mdornseif
Copy link
Contributor

Reasons for making this change

TextWidget generated <input type="string" ... >
HTML which is invalid as per
https://html.spec.whatwg.org/multipage/input.html#states-of-the-type-attribute

<input type="text" ... > would be apropriate.

The generation of invalid HTML results in undefined behaviour.
I got on the trail of the issue, because
testing-library/user-event
acted in strange ways.

This PR results in the generation of valid HTML and updates the tests.

fix #2090

If this is related to existing tickets, include links to them as well.

Checklist

  • I'm adding or updating code
    • I've added and/or updated tests
    • I've checked no updating needed for the docs if needed

…ttribute

TextWidget generated `<input type="string" ... >`
HTML which is invalid as per
https://html.spec.whatwg.org/multipage/input.html#states-of-the-type-attribute

`<input type="text" ... >` would be apropriate.

The generation of invalid HTML results in undefined behaviour.
I got on the trail of the issue, because
[testing-library/user-event](https://github.com/testing-library/user-event#typeelement-text-options)
acted in strange ways.

This PR results in the generation of valid HTML and updates the tests.

fix rjsf-team#2090
@mdornseif mdornseif changed the title [#2090] [fluent-ui] fix: Text inputs render with invalid attribute [GH-2090] [fluent-ui] fix: Text inputs render with invalid attribute Jan 26, 2021
Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

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

Thanks!

@epicfaace epicfaace merged commit 53ac2c2 into rjsf-team:master Jan 26, 2021
@epicfaace
Copy link
Member

@mdornseif would you mind contributing a similar fix to #2088, #2089, and #2087? Would really appreciate it!

@mdornseif
Copy link
Contributor Author

@epicfaace sure, "if time permits" :-) - thanks for your work on the awesome rjsf!

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

Successfully merging this pull request may close these issues.

[fluent-ui] Text inputs render with invalid type="string" attribute
2 participants