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

minLength being ignored #41

Closed
christianbundy opened this issue Feb 3, 2020 · 1 comment · Fixed by #42
Closed

minLength being ignored #41

christianbundy opened this issue Feb 3, 2020 · 1 comment · Fixed by #42

Comments

@christianbundy
Copy link
Contributor

Originally opened here: hyperhype/hyperscript#91

It looks like the minLength attribute isn't working for me:

const el = document.createElement("input");

el.type = "text"
el.minlength = 42
el.minLength = 43
el.maxlength = 420
el.maxLength = 421

console.log(el.outerHTML);

When using this library, the above code gives:

<input type="text" maxlength="420" maxLength="421">

When running in the browser, I get what I believe is the correct value:

<input type="text" minlength="43" maxlength="421">
@christianbundy
Copy link
Contributor Author

Using the latest HTML-Element: 2.3.0

christianbundy added a commit to christianbundy/html-element that referenced this issue Feb 3, 2020
Problem: The `minlength` attribute was missing from `html-attributes.js`
which meant that it was never included in the `outerHTML`.

Solution: Add the attribute and a test to ensure that this works and
that we can prevent future regressions.

Resolves 1N50MN14#41
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 a pull request may close this issue.

1 participant