Closed Bug 7548 Opened 23 years ago Closed 23 years ago

<select> not doing default select when tags close themselves


(Core :: Layout: Form Controls, defect, P3)

Mac System 8.5





(Reporter: Brade, Assigned: harishd)


(Whiteboard: [TESTCASE][1999.07.26]reporter to verify)


(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.

    <title> select test </title>

			  <select size="1" name="hrule.alignType">
			    <optgroup label="alignment" value="centered">
				    <option/>left alignment
				    <option/>center alignment
				    <option selected/>right alignment
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
Whiteboard: [TESTCASE] <option selected/> doesn't work, <option selected /> does...
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 "/>"
Closed: 23 years ago
Resolution: --- → INVALID
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:

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:

With this shorter syntax, also parsed as you would expect:

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!
Assignee: pollmann → harishd
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.
Resolution: INVALID → ---
reassign to harishd and clear resolution
Target Milestone: M9
cathy, I do have a fix for this.  But I will not be checking it in until I'm
convinced with the performance data :)
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Fix is in.

Marking FIXED.
Whiteboard: [TESTCASE] <option selected/> doesn't work, <option selected /> does... → [TESTCASE][1999.07.26]reporter to verify
kathy, can you please verify?
QA Contact massive update.
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.