Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#16814 closed defect (invalid)

dijits won't POST in IE9 when form node is under a paragraph

Reported by: Matt Lauer Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:


Like the title says, when a <form> tag is inside of a <p> tag and there are dijits in the form the dijits do not POST when the form is submitted in IE9.

This bug causes significant data loss, especially in when using dijit textareas. We run a CMS and obviously nobody trys to put a form inside a paragraph but due to the nature of rich text editors that happens frequently (we use dijit Editor). All other browsers and versions of IE (6-8, 10) seem to tolerate this markup, but IE9 silently dismisses the data.


        <textarea name='name1' data-dojo-type='dijit/form/Textarea' data-dojo-props='name: "name1"'></textarea>

Broken (in IE 9 only)

        <textarea name='name1' data-dojo-type='dijit/form/Textarea' data-dojo-props='name: "name1"'></textarea>

Here's a demo: (or or

I don't think JSFiddle can echo form data back, so you'll just have to watch the request body in IE9's console.

Problem exists in 1.8.1 & 1.8.3 for sure.


Change History (3)

comment:1 Changed 9 years ago by bill

Component: DijitDijit - Form
Owner: changed from bill to Douglas Hays

Hmm, I don't see what this has to do with rich text editors, and it's also against spec to put forms inside of paragraphs. Probably we should close this as wontfix. Doug?

comment:2 Changed 9 years ago by Douglas Hays

Resolution: invalid
Status: newclosed

Neither example passes validation:
Just move the P tags inside the FORM node, or alternatively, replace them with DIV.

comment:3 Changed 9 years ago by Matt Lauer

Sorry, but I don't think "invalid markup" is a valid response in in this case. I bet a majority of active websites are not valid markup so that seems like a crappy reason to dismiss a bug where all dijit/form elements break and fail to POST any form data.

It's not easy to just move the paragraphs inside the form node. It’s clear we need to watch how/where form tags are placed in our pages to help prevent similar problems in the future, but that's a different issue.

The fact that dijit/form elements POST data when forms are wrapped in paragraphs in all other other browsers (even old IE) and that IE9's standard form elements POST data when the form is submitted clearly points the finger at the broken dijit/form elements and away from invalid markup. The only thing that breaks when a form is in a paragraph is dijit/form elements, not the whole form.

The net result of this bug is partial form submissions from around 10% of our users who use IE9. We have incurred significant data loss since textareas contain lots of information. I can't accept that this as a markup issue when the problem is only dijit/form elements while all other standard form elements POST just fine.

Note: See TracTickets for help on using tickets.