Closed
Bug 49548
Opened 26 years ago
Closed 26 years ago
The 'type' property of an HTMLInputElement is '' unless explicitly set
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: jrgmorrison, Assigned: jst)
Details
(Whiteboard: [nsbeta3+][HAVE FIX])
Attachments
(2 files)
|
2.00 KB,
text/html
|
Details | |
|
1.91 KB,
patch
|
Details | Diff | Splinter Review |
Overview Description:
The 'type' property of an HTMLInputElement is '' unless explicitly set
Steps to Reproduce:
1) Load the attachment (to follow) and observe the output of the first two
alerts (or the dumps in mozilla)
Actual Results:
The attachment basically checks the .type property for HTML Form Controls.
For the HTML <input value="foo">, which defaults to being a text box, has
no value for the .type property.
Expected Results:
.type property should be 'text', since that is what it physically" is in the
absence of an explicitly set attribute on the element. That is what Nav4.x and
IE5 both report. [Although, ie and nav both have different bugs of their own,
noted in the text of the testcase, but that's not really important here).
Reproducibility: always
Build Date & Platform Bug Found:
2000081808 win2k
2000081808 mac
2000081808 linux
Additional Information:
The HTML <button value="foo">asdf</button> returns a .type of "Button"
1) So, it has a default value (good).
2) should it be returning "button" instead of "Button". (Similarily,
"submit" and "reset" instead of "Submit" and "Reset"). [This is not
as big a point as <input > having no default value, but returning
mixed-caps means some case-sensitve comparisons will fail].
| Reporter | ||
Comment 1•26 years ago
|
||
| Reporter | ||
Comment 2•26 years ago
|
||
Nominating nsbeta3, since this will cause some existing DOM 0 scripts to fail.
The use case is doing conditional processing on a collection of form controls,
where different controls have different properties/methods (e.g., .checked for
type='checkbox', .selectedItem for type='select', etc.). It also seems that this
may be a one-liner (and a couple more lines if you throw in the fix for <button>
returning 'Button' for its .type, etc.).
| Assignee | ||
Comment 3•26 years ago
|
||
This is trivial to fix, so we're (Me and Nisheeth) plussing this to get this out
of the way...
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3+][trivial fix]
Target Milestone: --- → M19
| Assignee | ||
Comment 4•26 years ago
|
||
| Assignee | ||
Updated•26 years ago
|
Priority: P3 → P2
Whiteboard: [nsbeta3+][trivial fix] → [nsbeta3+][HAVE FIX]
Comment 5•26 years ago
|
||
I see that jst checked in the fix, so marking as such.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•26 years ago
|
||
Heh, I just got a mid-air collision when I was gonna mark this fixed :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•