[FIX]Default label applied to <input> buttons with value=""

RESOLVED FIXED in mozilla1.2beta

Status

()

Core
Layout: Form Controls
P3
normal
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: Jonas Jørgensen, Assigned: bz)

Tracking

Trunk
mozilla1.2beta
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
Build 2002-09-05-08, Win2k.

Steps to reproduce:
1) Open testcase.

Expected results:
* The submit and reset buttons with no value attributes get a default label.
* The buttons which explicitly sets value to "" gets no label.

Actual results:
* The buttons get the default label even when they have a value="" attribute.
(Reporter)

Comment 1

16 years ago
Created attachment 97987 [details]
Testcase

Testcase works correctly in: Opera 6.0, MSIE 6.0.
Testcase does not work correctly in: Mozilla 1.1, Mozilla build 2002090508.

Comment 2

16 years ago
The value is what gets put in the button.  If you have a value, we put it in the
button.  If you set the value to blank, therefore, we put blank in the button. 
Unless this is breaking some major topsite, we should do it right rather than
just copying other browsers.
(Reporter)

Comment 3

16 years ago
> If you set the value to blank, therefore, we put blank in the button.

No we don't. If I set value to blank ("") on an <input type="submit">, we put
"Submit Query" in the button. Load the testcase and see for yourself.

Comment 4

16 years ago
Deepest apologies.  I read the summary wrong.  You are right.
Status: NEW → ASSIGNED
(Reporter)

Comment 6

16 years ago
> +  if (value.IsEmpty()) {
> +    // Have to have _something_ or we won't be drawn
> +    value.Assign(NS_LITERAL_STRING("  "));

That won't cause "  " two be submitted with the form, will it?

Comment 8

16 years ago
Comment on attachment 98113 [details] [diff] [review]
Like this?

r=jkeiser
Attachment #98113 - Flags: review+
Comment on attachment 98113 [details] [diff] [review]
Like this?

sr=jst
Attachment #98113 - Flags: superreview+
taking.
Assignee: jkeiser → bzbarsky
Status: ASSIGNED → NEW
Priority: -- → P3
Summary: Default label applied to <input> buttons with value="" → [FIX]Default label applied to <input> buttons with value=""
Target Milestone: --- → mozilla1.2beta
fixed for 1.2b.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.