Closed Bug 288186 Opened 20 years ago Closed 20 years ago

script tags inside select inside malformed table causes select to display improperly

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bsiegel, Assigned: mrbkap)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050328 Firefox/1.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050328 Firefox/1.0.2 When a malformed table contains a select tag, and within the select tag a script tag exists (perhaps to dynamically add <option>s), the select displays imporperly, with the text of the <option> tags displaying beside, rather than inside, the <select>. Reproducible: Always Steps to Reproduce: 1. Load attached test case. -OR- 2. Attempt to edit an existing mail filter using Sun's iPlanet Delegated Administrator 1.2 software package Actual Results: Select is displayed improperly - <option>s are displayed next to the Select. Expected Results: Select should display properly, with <option>s inside it.
Attached file testcase
This is typically a parser issue. I can see the bug also in Mozilla1.7.
Assignee: nobody → parser
Status: UNCONFIRMED → NEW
Component: Layout: Form Controls → HTML: Parser
Ever confirmed: true
Keywords: testcase
QA Contact: layout.form-controls → mrbkap
This is a problem with our misplaced content handling code. We handle the <select> as misplaced content (since the <script> is a valid child of <table> which opens and closes it), so when we try to handle the <option>, it ends up as a child of the <body>. I'm taking this, but it may be a while before I can try to fix this.
Assignee: parser → mrbkap
I just talked to Boris on IRC about this, and it appears that what we're doing now is as close as we're going to get. The basis of the problem is that both the <table> and the <select> have to be visible to the <script>. The <select> cannot be open outside of the <table> at the same time as the <table>, however, and the <table> shouldn't contain the <select>, so we have to close the <select>, and append the children of it to the body. Since dynamic insertion of content isn't one of the things that the parser can do (we'd need to dynamically insert the contents of the <select> [in this case the <option>] into it), I'm marking this WONTFIX.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: