Opened 11 years ago

Closed 7 years ago

#8295 closed defect (wontfix)

dijit.Editor breaks forms under IE7

Reported by: danilche Owned by: liucougar
Priority: high Milestone: future
Component: Editor Version: 1.2.3
Keywords: editor form Cc:
Blocked By: Blocking:

Description

if a dijit.Editor widget exists in the middle of a form, under IE, all the subsequent fields don't get submitted, e.g.:

<form action="/form_target.html" method="POST">

<p><input type="text" name="field1" value="foo" /> <p><div id="editorNode" class="tundra">Hello, world!</div> <p><input type="text" name="field2" value="bar" />

</form>

The field 'field1' gets submitted, but not 'field2'. if you send a 'close()' to the Editor first, then the form submission works fine.

Change History (8)

comment:1 Changed 11 years ago by danilche

Just to clarify, the dijit.Editor in this case got created programatically in my code, but it works the same for editor created from dojoType="dijit.Editor".

comment:2 Changed 11 years ago by Adam Peller

not sure it's valid to have a block element like a DIV inside a P. That may be at the root of your problem.

comment:3 Changed 11 years ago by danilche

Nesting block elements is valid, even <div> within <p> AFAIK, and this is definitely not the problem here -- I just tried removing every single <p> tag, and IE still omits the rest of the form after the dijit.Editor.

comment:4 Changed 11 years ago by danilche

Another interesting datum... if the form is set to 'enctype="multipart/form-data"', it works under IE. Enctype "application/x-www-form-urlencoded" breaks. Curiously, it also submits an array of empty form variable values corresponding to the Editor controls. here is my POST form content dump with 'enctype="multipart/form-data"':

ARGS => HASH(0x102443320)   (3 members)
      => ARRAY(0x10167af40)   (11 members)
        [0]  => ✓Paste
        [1]  => ✓Bold
        [2]  => ✓Italic
        [3]  => ✓Underline
        [4]  => ✓Strikethrough
        [5]  => ✓Numbered List
        [6]  => ✓Bullet List
        [7]  => ✓Align Left
        [8]  => ✓Align Right
        [9]  => ✓Align Center
        [10] => ✓Justify
     field1 => foo
     field2 => bar

The 11-element array represents 11 submitted form 'values' named "" -- an empty string. IE7 apparently thinks that the editor controls represent form elements.

If I set the form to method 'GET', I instead get this peculiar -- and clearly broken -- URL:

http://myserver.net/form_target.mhtml?field1=foo&=%3CSPAN+class%3D%22dijitReset+dijitInline+dijitEditorIcon+dijitEditorIconPaste%22+dojoAttachPoint%3D%22iconNode%22+unselectable%3D%22on%22+_zipIdx%3D%225%22%3E%3CSPAN+class%3D%22dijitReset+dijitToggleButtonIconChar%22+unselectable%3D%22on%22+_zipIdx%3D%225%22%3E%E2%9C%93%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN+class%3D%22dijitReset+dijitInline+dijitButtonText+dijitDisplayNone%22+id%3Ddijit_form_Button_4_label+dojoAttachPoint%3D%22containerNode%22+unselectable%3D%22on%22+_zipIdx%3D%225%22%3EPaste%3C%2FSPAN%3E&=%3CSPAN+class%3D%22dijitReset+dijitInline+dijitEditorIcon+dijitEditorIconBold%22+dojoAttachPoint%3D%22iconNode%22+unselectable%3D%22on%22+_zipIdx%3D%226%22%3E%3CSPAN+class%3D%22dijitReset+dijitToggleButtonIconChar%22+unselectable%3D%22on%22+_zipIdx%3D%226%22%3E%E2%9C%93%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN+class%3D%22dijitReset+dijitInline+dijitButtonText+dijitDisplayNone%22+id%3Ddijit_form_ToggleButton_0_label+dojoAttachPoint%3D%22containerNode%22+unselectable%3D%22on%22+_zipIdx%3D%226%22%3EBold%3C%2FSPAN%3E&=%3CSPAN+class%3D%22dijitReset+dijitInline+dijitEditorIcon+dijitEditorIconItalic%22+dojoAttachPoint%3D%22iconNode%22+unselectable%3D%22on%22+_zipIdx%3D%227%22%3E%3CSPAN+class%3D%22dijitReset+dijitToggleButtonIconChar%22+unselectable%3D%22on%22+_zipIdx%3D%227%22%3E%E2%9C%93%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN+class%3D%22dijitReset+dijitInline+dijitButtonText+dijitDisplayNone%22+id%3Ddijit_form_ToggleButton_1_label+dojoAttachPoint%3D%22containerNode%22+unselectable%3D%22on%22+_zipIdx%3D%227%22%3EItalic%3C%2FSPAN%3E&=%3CSPAN+class%3D%22dijitReset+dijitInline+dijitEditorIcon+dijitEditorIconUnderline%22+dojoAttachPoint%3D%22iconNode%22+unselectable%3D%22on%22+_zipIdx%3D%228%22%3E%3CSPAN+class%3D%22dijitReset+dijitToggleButtonIconChar%22+unselectable%3D%22on%22+_zipIdx%3D%228%22%3E%E2%9C%93%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN+class%3D%22dijitReset+dijitInline+dijitButtonText+dijitDisplayNone%22+id%3Ddijit_form_ToggleButton_2_label+dojoAttachPoint%3D%22containerNode%22+unsel

comment:5 Changed 11 years ago by Adam Peller

Owner: set to liucougar

Interesting! Cougar, can you take a look?

comment:6 Changed 11 years ago by Douglas Hays

Probably an IE bug with iframe inside a form element. I tried this in IE8 with dojo trunk revision [16492] and it worked OK.

comment:7 Changed 11 years ago by dante

Milestone: tbdfuture

comment:8 Changed 7 years ago by bill

Component: DijitEditor
Resolution: wontfix
Status: newclosed

I think we'll desupport IE6 & IE7 before we get around to fixing this.

Note: See TracTickets for help on using tickets.