Closed
Bug 7548
Opened 26 years ago
Closed 25 years ago
<select> not doing default select when tags close themselves
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
VERIFIED
FIXED
M9
People
(Reporter: Brade, Assigned: harishd)
Details
(Whiteboard: [TESTCASE][1999.07.26]reporter to verify)
Attachments
(2 files)
In the following html, "right alignment" isn't selected.
However, if I change the <option> tags to be formatted so the closure is in a
separate tag like:
<option>left alignment</option>
then the 3rd item does get selected.
<html>
<head>
<title> select test </title>
</head>
<body>
<form>
<select size="1" name="hrule.alignType">
<optgroup label="alignment" value="centered">
<option/>left alignment
<option/>center alignment
<option selected/>right alignment
</optgroup>
</select>
</form>
</body>
</html>
Reporter | ||
Comment 1•26 years ago
|
||
note: the problem is the same if you change it to a list (size="3")--no selection
is made unless using </option>
Moving all Widget Set bugs, past and present, to new HTML Form Controls
component per request from karnaze. Widget Set component will be retired
shortly.
Comment 3•26 years ago
|
||
Updated•26 years ago
|
Whiteboard: [TESTCASE] <option selected/> doesn't work, <option selected /> does...
Comment 4•26 years ago
|
||
Overview Description:
<option selected/> does not work as expected, <option selected /> does.
Steps to reproduce:
1) load the attachment
2 [details] [diff] [review]) have a look at the two combo boxes. The left one has it's third option like
that: <option selected/>; the right one's third option looks like this: <option
selected />
Actual result:
the left box displays its first option; only the right box (correctly) displays
its third option.
Expected result:
both boxes to have their third option selected
Build No.: 1999071417 build (Win32)
Additional information:
Obviously, the tag is imho (internally) split up into "<", "option",
"selected/" and ">" and not into "<", "option", "selected" and "/>"
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Comment 5•26 years ago
|
||
As far as I know, the self-closing tag syntax <foo/> is an XML-ism. I just read
through the HTML 4 spec and couldn't find mention of it.
Just as a check, I created a page that passes all the fun tests at:
http://validator.w3.org/
But contained an <option/> tag. Weblint complained:
line 11: unknown element <OPTION/>.
line 12: unknown attribute "SELECTED/" for element <OPTION>.
At any rate, if this bug is to be fixed, it needs to be fixed in the parser, as
the content model is being constructed incorrectly for your interpretation. As
Christian guessed, it is being parsed as < option selected/ >, as can be seen by
viewing the document in viewer then dumping the content model.
You can work around this bug, if you are truly averse to using:
<select>
<option>foo</option>
</select>
With this shorter syntax, also parsed as you would expect:
<select>
<option>foo
<option>bar
</select>
I'm going to mark this bug invalid. If you really want this to work as you
described, please reopen but assign to harishd, the parser guru. Thanks!
Comment 6•26 years ago
|
||
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Updated•26 years ago
|
Assignee: pollmann → harishd
Status: REOPENED → NEW
Reporter | ||
Comment 7•26 years ago
|
||
reopening bug
I'd like harishd to at least look into the bug to ensure that the bug isn't
causing problems / other bugs in the parser.
Reporter | ||
Updated•26 years ago
|
Resolution: INVALID → ---
Reporter | ||
Comment 8•26 years ago
|
||
reassign to harishd and clear resolution
cathy, I do have a fix for this. But I will not be checking it in until I'm
convinced with the performance data :)
Status: NEW → RESOLVED
Closed: 26 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•25 years ago
|
||
Fix is in.
Marking FIXED.
Whiteboard: [TESTCASE] <option selected/> doesn't work, <option selected /> does... → [TESTCASE][1999.07.26]reporter to verify
Comment 11•25 years ago
|
||
kathy, can you please verify?
Comment 12•25 years ago
|
||
QA Contact massive update.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 13•25 years ago
|
||
Marking VERIFIED FIXED in MacOS86 102708 apprunner.
Also works on Linux6 102708 apprunner and Win98 102709 apprunner.
You need to log in
before you can comment on or make changes to this bug.
Description
•