Closed Bug 37618 Opened 24 years ago Closed 24 years ago

font tag in option closes out select

Categories

(Core :: DOM: HTML Parser, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: tangduc, Assigned: harishd)

References

()

Details

(Whiteboard: [nsbeta3+][Fix in hand])

Attachments

(2 files)

There is a problem with tbe nowrap. This may be a dupe of 18644 though.
I'm seeing this too. Removing all the NOWRAP makes the page load normal. The
page renders correct in 4.7x, adding 4xp keyword. It also works with Netscape pr1.

Confirming bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: 4xp
The nowrap isn't the problem, it actually shows it. The "Select a State" box has
its options shown as text, inside a <td></td>. It's a long text, all those
states, so you get a very wide column in your table.

The actual problem is in these lines:
<form name="frmStates" method="post"><br><img src="/ci/nat_s.gif"
alt="National"><br><font face="arial" size="2">
<select name="selectState" width="20"
onChange="location.href=frmStates.selectState.options[frmStates.selectState.options.selectedIndex].value">
<option value=""><Font size="2" face="arial">Select a State</font>

Remove the first (unclosed) font tag and the page should display fine. I'll
creating a simplified case.

Should Mozilla handle this more gracefully, or should it draw the line "fix yer
html"?

Changing component to HTML Form Controls.
Component: HTMLTables → HTML Form Controls
Rod, the attachment doesn't have a table in it.
Assignee: karnaze → rods
<select>
<option><font>Option 1</font>
<option>Option 2
<option>Option 3
</select>

Option content should never have font tags in them.

The parser seems to be doing the correct thing by closing out the select when it 
hits the "font" tag. But for nav quirks we need it to ignore the font tag and 
continue processing the options.
Assignee: rods → rickg
Component: HTML Form Controls → Parser
changed summary
Summary: Table too wide → font tag in option closes out select
That's because the problem isn't in tables...

I was about to fix the summary, but someone beat me to it:
<font> around <select> with <font> in <option> breaks select

Rod is almost correct, the problem however lies in the <font> tag before the 
<select>:

<form method="post">
<font face="arial" size="2">    <!-- this one -->
<select>
<option><font>Option 1</font>
<option>Option 2
<option>Option 3
</select>
</form>

If you remove the first <font> it will render just fine in Mozilla. Rod's 
example is actually the second (working) example in the attachment.
Shouldn't that first <font> be closed? Or has this to do with bug 6169 where 
NavQuirk support for <font><select></font> has been put in?
Reassigning to myself.
Assignee: rickg → harishd
Target Milestone: --- → M17
*** Bug 38377 has been marked as a duplicate of this bug. ***
*** Bug 39767 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
This completely horks any pages that have font tags or any other type of tag 
buried inside a select. I see this more and more. Nominating for nsbeta3
Keywords: nsbeta3
*** Bug 42597 has been marked as a duplicate of this bug. ***
*** Bug 43072 has been marked as a duplicate of this bug. ***
Target Milestone: M17 → M18
Attached patch Proposed patchSplinter Review
*** Bug 44849 has been marked as a duplicate of this bug. ***
Whiteboard: Fix in hand
*** Bug 45537 has been marked as a duplicate of this bug. ***
Marking nsbeta3+.  Harish please check in your fix.  Thanks.
Whiteboard: Fix in hand → [nsbeta3+][Fix in hand]
Fix is in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Tested using 8/25 builds on Win and Mac and 8/28 build on Linux. Verified bug 
fixed (assuming FONT FACE has no effect on option text).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: