-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 novalidate
attribute doesn't render when conditional (given a value)
#15082
Comments
I think I see the issue! The JS output is showing that the attribute is being set on the JS DOM object as The casing there is important. |
I'm not an expert on this repo, but I think this could be fixed via adding a svelte/packages/svelte/src/utils.js Lines 184 to 200 in 09510c8
🤔 |
Want to become a contributor? Open a PR and add a test 😉 If you don't get to it, I'll take a stab at it tomorrow. |
On it! |
PR up: #15083 |
Describe the bug
Adding a
novalidate
attribute to a<form>
element is not rendering that attribute, unless it's not conditional (no value is given).For example, this works:
<form novalidate></form>
... but this does not work:
<form novalidate={true}></form>
Reproduction
Here's a minimal reproduction using the latest release of Svelte (v5.19.1):
https://svelte.dev/playground/585b8c82301d4c65bc83eeaeda119d68?version=5.19.1
Logs
System Info
System: OS: Linux 4.4 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish) CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Memory: 13.48 GB / 31.74 GB Container: Yes Shell: 5.1.16 - /usr/bin/bash npmPackages: svelte: ^5.19.0 => 5.19.0
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: