#13568 closed defect (fixed)
When using the Editor with FindReplace plugin in a form tag with the HTML5 doctype, form values from the dialogs raise HTML5 form validation errors when trying to submit
Reported by: | William Riley | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Editor | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The issue involves the new validation features in HTML5. I'm pretty certain the form is reading the aria-required/aria-invalid property from some of the form fields in certain editor plugins, preventing the form from being submitted, even though those fields don't get submitted with the form.
I'm pretty sure this happens in both FF and Chrome.
Rough sample case:
<!DOCTYPE html> ... <form action="." ...> <div data-dojo-type="dijit.Editor" data-dojo-props="plugins: ['createLink']"></div> </form>
Current workaround is to set the 'novalidate' property on the form, thus preventing the validation from stopping submission:
<form action="." novalidate="true" ...>
Attachments (1)
Change History (13)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
I was surprised too. If that doesn't work, I can give a more specific test case that I tried earlier today and confirmed that this was happening.
Changed 9 years ago by
Attachment: | editorbug.html added |
---|
Editor test case for bug involving HTML5 validation
comment:4 Changed 9 years ago by
It seems that the FindReplace plugin is what's causing the problem. Looks like the form fields for that are inline with the editor rather than copied into the body, which would explain the behaviour. I probably should have narrowed it down before submitting the bug, sorry bout that.
Edit: also, I'm using Dojo 1.7b2, not sure if this happens in 1.6 or not.
comment:5 Changed 9 years ago by
Owner: | set to Jared Jurkiewicz |
---|
No worries, did you figure out why it's invalid? aria-required/aria-invalid sound like valid fields to me.
Anyway, find/replace is Jared's plugin so assigning to him.
comment:6 Changed 9 years ago by
Summary: | When using the Editor in a form tag with the HTML5 doctype, form values from the dialogs raise HTML5 form validation errors when trying to submit → When using the Editor with FindReplace plugin in a form tag with the HTML5 doctype, form values from the dialogs raise HTML5 form validation errors when trying to submit |
---|
comment:7 Changed 9 years ago by
Oh, I didn't mean valid in the context of standards, I meant in the context of form validation:
comment:9 Changed 9 years ago by
I'm not sure how well implemented it is across browsers, but this may be useful:
comment:10 Changed 9 years ago by
The mere presence of required on the field (or checkbox) causes it, even if the value is false. Will check in removing those attributes.
comment:12 Changed 9 years ago by
Milestone: | tbd → 1.7 |
---|
That's really weird/hard to believe since the TooltipDialog are moved to be direct children of <body>, and thus they are outside the <form>.