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
changing qa contact to janc
QA Contact: gerardok → janc
Target Milestone: ---
forgot to set platform/os to all/all
OS: Windows NT → All
Hardware: PC → DEC
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
Last Resolved: 19 years ago
Resolution: --- → INVALID
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
You need to log in before you can comment on or make changes to this bug.