-
-
Notifications
You must be signed in to change notification settings - Fork 969
Bug with disabled attribute on component itself #3021
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
Comments
I also checked other "boolean" html attributes: |
Thank you it looks like a bug. Side note: this is an edge case since you should not use specific native boolean attributes on elements that do not support them |
Maybe I didn’t understand your message correctly, but I don’t see any difference between native and non-native attributes from a developer’s perspective when building a frontend. I don’t care much about W3C validations and prefer clean code, even if it breaks some standards. I also don’t think Riot should behave differently in those cases. It’s just too complicated to constantly think like "Oh, if I put this on a button, it will work differently than if I put it on a link." Anyway, |
I have checked this issue and its solution is trivial https://github.com/riot/compiler/blob/main/src/generators/template/expressions/attribute.js#L48-L54 Thank you for reporting it |
This issue was fixed in Riot.js@10.0.0-alpha.3. @kachurun could you please check if it works for you? Thanks |
Yep, looks great |
Uh oh!
There was an error while loading. Please reload this page.
Help us to manage our issues by answering the following:
When the disabled attribute is set to false in the component, it still renders as
disabled="false"
. However, settingdisabled={ null }
does not cause this issue, and the disabled attribute is correctly omitted.Example:
The result is:
Post the link using one of our bug report templates:
On which browser/OS does the issue appear?
Which version of Riot does it affect?
I noticed this issue after upgrading from 7.1.0 to 9.4.0.
How would you tag this issue?
The text was updated successfully, but these errors were encountered: