Closed
Bug 3255
Opened 26 years ago
Closed 26 years ago
Internal state of select element not reflected on screen.
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: paul, Assigned: karnaze)
Details
Changing the selected index of a select element via the DOM doesn't seem to be
reflected on the screen. To reproduce the symptoms:
1. Have NGLayout display a form containing a two-option select element. The
first option is displayed in the list box.
2. Now, via XPCOM (nsIDOMHTMLSelectElement's SetSelectedIndex), set the index of
the selected option to 1 (the index of the second option). The first option is
still displayed in the list box, which is incorrect.
3. Note however that nsIDOMHTMLSelectElement's GetSelectedIndex now returns 1,
indicating that the DOM was correctly updated (but the screen wasn't).
This is the behavior using a Win32 optimized build of NGLayout, running under NT
4.0.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 1•26 years ago
|
||
Using a debug 2/24 NT build, this works ok as the following test illustrates.
Recent changes may have fixed this if an older build was used. An optimized
build should not be causing this.
<form>
<input type=button value="print selectedIndex"
onclick="printSelectedIndex()">
<input type=button value="setSelectedIndex to 1" onclick="setSelectedIndex()">
<BR>
<select name="select1">
<option value="std"> Standard </option>
<option value="overnite"> Overnight </option>
</select>
<script>
var selects = document.getElementsByTagName("SELECT");
var numSelects = selects.length;
function printSelectedIndex() {
for (var i = 0; i < numSelects; i++) {
dump("selected index = " + selects[i].selectedIndex + "\n");
}
}
function setSelectedIndex() {
selects[0].selectedIndex=1;
}
</script>
</body>
</html>
Updated•26 years ago
|
QA Contact: 4110 → 4137
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 2•26 years ago
|
||
This seems working fine. Marking as verified.
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•