Closed
Bug 50376
Opened 24 years ago
Closed 24 years ago
[MF][FIX][CBX]Cannot select with DOM option on dynamically created SELECT element
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: ken_mori, Assigned: rods)
References
Details
(Whiteboard: Fix in hand)
Attachments
(2 files)
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) BuildID: 2000080712 Cannot select an option on a dynamically created Select element via JavaScript Reproducible: Always Steps to Reproduce: 1. Create an select element 2. Add the select element to the document 3. Select an option Actual Results: Desired option is not selected Expected Results: Desired option is selected (IE5 works)
Comment 2•24 years ago
|
||
confirming. using the 2000082708 nightly on win2k
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can se it with M17 Unreproducible with Build: 2000090104(M18) Look like it's fixed :) Marking as WORKSFORME
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Comment 5•24 years ago
|
||
reopening. Asa & I are still seeing this with the 20000927 win32 builds.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You are right, I can see it again with 2000092711 but I'm sure it worked fine with 2000090104, I'll download it and try again to see if it's a regression or if it really never worked and I had a hallucination ;)
2000090104 is missing from the FTP :( the oldest M18 build I can find is 2000091304, and the bug is reproducible with it.
Updating OS and Platform based on the reports of the folks at #mozillazine Making the Sumary more clear(hope)
OS: Windows 2000 → All
Hardware: PC → All
Summary: Cannot select option on dynamically created SELECT element → Cannot select with DOM option on dynamically created SELECT element
Comment 9•24 years ago
|
||
Rod, I traced through what nsHTMLOptionElement::SetSelected() does and I don't see any obvious problems, could you have a closer look at this?
Assignee: jst → rods
Status: REOPENED → NEW
Assignee | ||
Comment 10•24 years ago
|
||
The problem is the correct option gets set before the list intialized. When it is initialized a Reset is called and it loses it's value. I think the best thing to do in this situation is maybe to create a PresState.
Status: NEW → ASSIGNED
Assignee | ||
Updated•24 years ago
|
Summary: Cannot select with DOM option on dynamically created SELECT element → [CBX]Cannot select with DOM option on dynamically created SELECT element
Target Milestone: --- → Future
Comment 11•24 years ago
|
||
Why is this future? I know it isn't very critical, but it's a bug in DOM level 1 and IMHO it should be fixed before 1.0 I can't see any reason to no fix this for 1.0, if I'm wrong please tell me.
Comment 12•24 years ago
|
||
Future doesn't mean 'after 1.0', it means 'in the future'. For all practical purposes, if the bug is assigned to a Netscape engineer (like this one) it means 'after Netscape 6.0 has shipped'. If you think a bug must be fixed before, mozilla1.0, add the mozilla1.0 keyword to the bug's keywords field.
Keywords: mozilla1.0
Comment 13•24 years ago
|
||
Sorry for my mistake. Thanks Hixie for the clarification, but I understand that "all" the bugs are going to be fixed 'in the future' so, what is the purpose of the future Milestone(apart of the special mean in bugs assigned to NS engineers)? I searched mozilla.org for a "future milestone" explanation but I failed to find it, may be we need one, If some one is able to make me understand this I'll write the explanation. Thanks again and sorry for the oftopic spam.
Comment 14•24 years ago
|
||
This is pretty important because you can't seem to select an option. As this and setting "selectedIndex" in the HTMLSelectElement is not available how are you supposed to do it using DOM?
Comment 15•24 years ago
|
||
selectedIndex in HTMLSelectElement does work. Sorry about that.
Assignee | ||
Updated•24 years ago
|
Summary: [CBX]Cannot select with DOM option on dynamically created SELECT element → [FIX][CBX]Cannot select with DOM option on dynamically created SELECT element
Whiteboard: Fix in hand
Assignee | ||
Comment 16•24 years ago
|
||
*** Bug 60088 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•24 years ago
|
Priority: P3 → P1
Target Milestone: Future → ---
Assignee | ||
Updated•24 years ago
|
Summary: [FIX][CBX]Cannot select with DOM option on dynamically created SELECT element → [MF][FIX][CBX]Cannot select with DOM option on dynamically created SELECT element
Comment 17•24 years ago
|
||
If you write in the testcase on line over <pre> cur.selected=true; </pre> something like <pre> var a=cur.selected; </pre> (var a=cur; is not enough!) or <pre> var a=document.getElementsByID('option')[0]; </pre> then the <pre> cur.selected=true; </pre> works for me! hmmm!
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
r=kmcclusk@netscape.com
Assignee | ||
Comment 20•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•