Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#8537 closed defect (duplicate)

Button: label problem: IE- and Firefox-behaviour contradict each other

Reported by: thekryz Owned by: Douglas Hays
Priority: high Milestone: 1.3
Component: Dijit - Form Version: 1.2.3
Keywords: Dijit.Button input button ie firefox value label Cc:
Blocked By: Blocking:

Description

I make my Button with an <input> instead of <button> like this:

<input type="submit" dojoType="dijit.form.Button" value="ABC" label="123">

and

<input type="button" dojoType="dijit.form.Button" value="ABC" label="123">

While the native non-Dojo-Button will always (IE and Firefox) show the "value" or a standard-label (in case no value exists and the Button is of type="submit" - otherwise no text will be shown), the Dijit.Button shows very different behaviour, depending on the browser used.

In IE7, The "value" will be used, while the "label" is ignored completely (if there is a "label", but no "value", the Button is empty). The Button's label behaves exactly like the native browser's button concerning the label.

Firefox and IE8 RC1 go the opposite direction: The "label" will be shown while the "value" is ignored completely. If there is no label, the text on the button is non-existant.

The workaround is of course to put a "value" AND a "label" with the SAME TEXT in the input-tag - but the different browser-behaviours are obviuosly a bug. And maintaining two similar attributes is more error-prone.

My suggestion would be to treat the label in the same way as the native buttons do (and Dojo does in IE7): use the "value".

I attached an overview of the browser's behaviours and a testfile.

Attachments (3)

normal_button.jpg (37.8 KB) - added by thekryz 11 years ago.
Overview: Button with type="button"
submit_button.jpg (46.8 KB) - added by thekryz 11 years ago.
Overview: Button with type="submit"
ButtonLabelTest.html (2.9 KB) - added by thekryz 11 years ago.
Testfile

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by thekryz

Attachment: normal_button.jpg added

Overview: Button with type="button"

Changed 11 years ago by thekryz

Attachment: submit_button.jpg added

Overview: Button with type="submit"

Changed 11 years ago by thekryz

Attachment: ButtonLabelTest.html added

Testfile

comment:1 Changed 11 years ago by bill

Owner: set to Douglas Hays
Summary: Dijit.Button label problem: IE- and Firefox-behaviour contradict each otherButton: label problem: IE- and Firefox-behaviour contradict each other

Hmm, I think we've seen this issue before; perhaps this is a dup of another ticket?

comment:2 Changed 11 years ago by Douglas Hays

Milestone: tbd1.3
Resolution: duplicate
Status: newclosed

Dup of #8005 fixed in [15649] in 1.3 trunk. Label is always.

comment:3 Changed 9 years ago by bill

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