You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the HTML grapes is then rendered outside Grapes and the input is checked if it's required, this fails as Chrome always returns true is the required attributes is set... regardless of the value.
I've been looking into this myself but not figure it out yet but it looks like Components needs a removeAttribute function to handle this.
Sorry, but in a rush, so I'll provide fiddle on Monday...
The text was updated successfully, but these errors were encountered:
@artf Thanks for the quick solution but it doesn't appear to work. Both inspecting the Grapes source and calling getHtml() return required="true" and required="false". I'm guessing because the attribute is a boolean value represented as a string.
I will where I can but, unfortunately, I'm on an unusual tight schedule for the GDPR rules coming in.
I think commit 9a71368 is not enough. It writes boolean attributes without their values to the html output fine. But when the output is read again by the editor, then the boolean attributes are not initialized. If the boolean attribute was shown in the html (which means the value is true), then the editor initializes this attribute with value: "" and not true.
When html attributes are true or false, the should either exist or not exist.
For example,
required
. This don't have a value in HTML5.<input type="text">
<input type="text" required>
<input type="text" required="false">
<input type="text" required="true">
When the HTML grapes is then rendered outside Grapes and the input is checked if it's required, this fails as Chrome always returns
true
is therequired
attributes is set... regardless of the value.I've been looking into this myself but not figure it out yet but it looks like Components needs a
removeAttribute
function to handle this.Sorry, but in a rush, so I'll provide fiddle on Monday...
The text was updated successfully, but these errors were encountered: