#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)
Change History (6)
Changed 13 years ago by
Attachment: | normal_button.jpg added |
---|
comment:1 Changed 13 years ago by
Owner: | set to Douglas Hays |
---|---|
Summary: | Dijit.Button label problem: IE- and Firefox-behaviour contradict each other → Button: 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 13 years ago by
Milestone: | tbd → 1.3 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
comment:3 Changed 11 years ago by
Component: | Dijit → Dijit - Form |
---|
Overview: Button with type="button"