Closed
Bug 32723
Opened 24 years ago
Closed 24 years ago
select.add() method using NULL doesn't add to the head of the list
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
INVALID
People
(Reporter: jcarpenter0524, Assigned: jst)
Details
Attachments
(1 file)
1.39 KB,
text/html
|
Details |
Overview Description: The spec says that when using the .add() method of SELECT, NULL should represent the head of the list. So if you are adding multiple items to the select list, and use NULL as the before attribute, the item you add should be added to the top of the list. The bug is that it is still adding to the bottom of the list. From the spec: add Add a new element to the collection of OPTION elements for this SELECT. Parameters element The element to add. before The element to insert before, or NULL for the head of the list. Steps to Reproduce: - see test case Actual Results: item is added to bottom of list Expected Results: item should be added to top of list Build Date & Platform Bug Found: 2000-03-21-06-M15-nb1b Additional Builds and Platforms Tested On: Mac 2000-03-21-06 Linux 2000-03-21-09
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
changing qa contact to janc
QA Contact: gerardok → janc
Target Milestone: ---
Reporter | ||
Comment 3•24 years ago
|
||
forgot to set platform/os to all/all
OS: Windows NT → All
Hardware: PC → DEC
Reporter | ||
Updated•24 years ago
|
Hardware: DEC → All
Assignee | ||
Comment 4•24 years ago
|
||
Janc, this was changed in the DOM Level 2 spec, and, the Level 1 spec doesn't make sense, if null causes elements to be added to the beginning of the list then it's impossible to append elements to the select. Actually, I just had a look at the level 1 errata and this is mentioned in there, marking INVALID, mozilla already does the right thing.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 5•24 years ago
|
||
My bad, DOM1 Eratta: "The description of the before parameter of the add method reads: The element to insert before, or null for the head of the list. Instead it should read: The element to insert before, or null for the tail of the list."
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•