Opened 10 years ago

Closed 10 years ago

Last modified 5 years ago

#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)

testSubmit.html (720 bytes) - added by mauricio.delolmo 10 years ago.
Simple example

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by mauricio.delolmo

Attachment: testSubmit.html added

Simple example

comment:1 Changed 10 years ago by bill

Owner: set to Douglas Hays

comment:2 Changed 10 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

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.

Last edited 5 years ago by bill (previous) (diff)

comment:3 Changed 10 years ago by bill

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 10 years ago by bill

Summary: Submit form in IE includes <span> tagsButton: submitting form in IE includes <span> tags

comment:5 Changed 10 years ago by Douglas Hays

Resolution: wontfix
Status: closedreopened

comment:6 Changed 10 years ago by Douglas Hays

Milestone: 1.5

comment:7 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

(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 9 years ago by bill

Component: DijitDijit - Form

comment:9 Changed 5 years ago by bill

Summary: Button: submitting form in IE includes <span> tagsButton: 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.

Last edited 5 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.