Closed
Bug 3251
Opened 26 years ago
Closed 26 years ago
State of radio button group not reflected in DOM
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: paul, Assigned: karnaze)
Details
The DOM doesn't seem to track a radio button group's screen behavior. To
reproduce the symptoms:
1. Have NGLayout display a form containing a two-button radio button group.
2. Press the first button (use the mouse: pressing buttons via the keyboard
(e.g. using the spacebar) doesn't work, but that's another bug report). The
screen shows that the first button is checked.
3. Press the second button. The screen shows that the first button is now
unchecked, and the second button is checked.
4. Now, using XPCOM, query the DOM for the state of the first button.
According to nsIDOMHTMLInputElement's GetChecked, the first button is still
checked.
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.
<html>
<body>
<form>
<input type=button value="print values" onclick="printValues()">
<BR>
<input type=radio checked name=foo>radio1<BR>
<input type=radio name=foo>radio2<BR>
</form>
<script>
var inputs = document.getElementsByTagName("INPUT");
var numInputs = inputs.length;
function printValues() {
for (var i = 1; i < numInputs; i++) {
dump("radio " + i + " checked=" + inputs[i].checked + "
defaultChecked=" + inputs[i].defaultChecked + "\n");
}
dump("\n");
}
</script>
</body>
</html>
Assignee | ||
Comment 2•26 years ago
|
||
The newlines caused problems when pasted in the bug report.
<form>
<input type=button value="print values" onclick="printValues()">
<BR>
<input type=radio checked name=foo>radio1<BR>
<input type=radio name=foo>radio2<BR>
</form>
<script>
var inputs = document.getElementsByTagName("INPUT");
var numInputs = inputs.length;
function printValues() {
for (var i = 1; i < numInputs; i++) {
dump("radio " + i + " checked=");
dump(inputs[i].checked + "defaultChecked=");
dump(inputs[i].defaultChecked + "\n");
}
dump("\n");
}
</script>
</body>
</html>
Updated•26 years ago
|
QA Contact: 4110 → 4137
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
•