#10834 closed defect (fixed)
Button: submitting form in IE includes <span> tags (IE<8, quirks)
Reported by: | mauricio.delolmo | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit - Form | Version: | 1.4.0 |
Keywords: | dijit.form.Button, IE, submit | Cc: | |
Blocked By: | Blocking: |
Description
The field value of the submit button is not the string expected but rather some HTML span tags. This is only happening in Internet Explorer but in Firefox it works well.
The button is a dijit.form.Button type submit.
I'm attaching a simple html page to exemplify this strange behaviour. When you click on the submit button it sends the following values:
IE: testSubmit?submit=%3CSPAN+class%3D%22dijitReset+dijitInline%22+dojoAttachPoint%3D%22iconNode%22+unselectable%3D%22on%22%3E%3CSPAN+class%3D%22dijitReset+dijitToggleButtonIconChar%22+unselectable%3D%22on%22%3E%E2%9C%93%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN+class%3D%22dijitReset+dijitInline+dijitButtonText%22+id%3Dsubmit_label+dojoAttachPoint%3D%22containerNode%22+unselectable%3D%22on%22%3ESend%3C%2FSPAN%3E
Firefox: testSubmit?submit=submit
This is happening both in Dojo 1.4.0 and 1.4.1.
Somehow it's related with http://bugs.dojotoolkit.org/ticket/8117
Attachments (1)
Change History (10)
Changed 11 years ago by
Attachment: | testSubmit.html added |
---|
comment:1 Changed 11 years ago by
Owner: | set to Douglas Hays |
---|
comment:2 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This is one of those special IE things that happens natively:
<html> <body> <form method="GET" action=""> <button id="submit" name="submit" type="submit" value="submit"> <span>Send</span> </button> </form> </body> </html>
will do the same thing that you described even though Dojo is not involved. So this is more of a cantfix. Please reopen and attach a patch if you figure out how to fix this.
comment:3 Changed 11 years ago by
Seems this is one of those things we could fix by rendering the Button widget using plain <div>'s/<span>'s, and having a hidden <button> node that we trigger programatically. when the Button.domNode is pressed.
comment:4 Changed 11 years ago by
Summary: | Submit form in IE includes <span> tags → Button: submitting form in IE includes <span> tags |
---|
comment:5 Changed 11 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:6 Changed 11 years ago by
Milestone: | → 1.5 |
---|
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [21894]) Fixes #10693, #10834. Refs #11003. Add hidden INPUT tag to Button templates. The BUTTON tag will invoke the click method of the INPUT tag. This fixes the IE issues with multiple submit buttons and with submit values. The BUTTON continues to have visible rich text content and the INPUT has a simple value name name attribute that actually gets submitted but is otherwise invisible to the user.
comment:8 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
comment:9 Changed 6 years ago by
Summary: | Button: submitting form in IE includes <span> tags → Button: submitting form in IE includes <span> tags (IE<8, quirks) |
---|
Happened in quirks mode in IE6 - 9. Happened in standards mode in IE6 - IE7 only.
Simple example