Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#8005 closed defect (fixed)

dijit.form.Button iconClass not working in IE7

Reported by: plasticsnake Owned by: Douglas Hays
Priority: high Milestone: 1.3
Component: Dijit - Form Version: 1.2.0
Keywords: Cc:
Blocked By: Blocking:

Description

got a strange problem in IE7

I wanted to add icons to my buttons but with a value on the button the icon does not display on IE7 but works perfectly in FF

<button name="moo" id="moo" type="button" value="this kills the icon" iconClass="dijitEditorIcon dijitEditorIconSave" dojoType="dijit.form.Button">Save Template</button>

remove the value and it works perfectly

<button name="moo" id="moo" type="button"  iconClass="dijitEditorIcon dijitEditorIconSave" dojoType="dijit.form.Button">Save Template</button>

has anyone else encountered this?

im using zend framework to add the button using addelement and the value is automatically inserted even if you do not set one (think it uses the label value)

Change History (6)

comment:1 in reply to:  description Changed 11 years ago by plasticsnake

if you cant see the code examples (i cant in ie7 but can in FF) here they are again

<button name="moo" id="moo" type="button" value="this kills the icon" iconClass="dijitEditorIcon dijitEditorIconSave" dojoType="dijit.form.Button">Save Template</button>

remove the value and it works perfectly

<button name="moo" id="moo" type="button" iconClass="dijitEditorIcon dijitEditorIconSave" dojoType="dijit.form.Button">Save Template</button>

comment:2 Changed 11 years ago by bill

Owner: set to Douglas Hays

comment:3 Changed 11 years ago by Douglas Hays

Milestone: tbd1.3

On IE, the button's initial value can be set and queried but is not submitted on form submit, but rather the button's innerHTML. Setting value after element creation replaces innerHTML with the value. On other browsers, the button's value is submitted on form submit.

comment:4 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

[15649] Fixes #8005. Disallow setting value on a Button widget after creation to prevent innerHTML from being overwritten.

comment:5 Changed 11 years ago by Douglas Hays

[15657] References #8005. Change attr() overload to _setValueAttr for consistency.

comment:6 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.