Closed
Bug 52786
Opened 25 years ago
Closed 25 years ago
[CHK]checkbox.checked returns wrong (or there's time delay in displaying updated checkbox?)
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: federicosasso, Assigned: rods)
Details
(Whiteboard: [need info] need clarification of what the real problem is at this point)
Attachments
(1 file)
|
276 bytes,
text/html
|
Details |
From Bugzilla Helper:
BuildID: 2000061311
after an onClick event over a checkbox, the checkbox state is not updated
straight away, so that the associated script cannot read the correct .checked
property, and reads instead its opposite state
Reproducible: Always
Steps to Reproduce:
1. create a form like this:
<form name="f12">
<input type="checkbox" onClick="setEntry('f12')" name="theCheck" />
</form>
2. add in the head section this function:
function setEntry(aFormName) //string
{
var aForm = document.forms[aFormName];
var aCheck = aForm.theCheck;
alert(aCheck.checked);
}
3. click on the checkbox
Comment 1•25 years ago
|
||
WFM with Linux 2000-09-16-06.
Reporter, your build is old, please try with a more recent one.
Comment 2•25 years ago
|
||
Comment 3•25 years ago
|
||
wfm windows 98 2000091508
Comment 4•25 years ago
|
||
marking worksforme with the 2000092308 nightly on win2k
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Comment 6•25 years ago
|
||
Hmm.. I dont know. The way it works for me is:
--Check box looks unchecked --
1) I click.
2) Alert pops up saying it is checked.
3) I dismiss the alert
-- Check box looks checked --
I think that the check box should be either checked before onclick event handler
is called - at the same time as "true" value is assigned or shouldn't be
assigned "true" value untill the checkbox looks checked.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Comment 7•25 years ago
|
||
... This was behaviour on Windows 98 build 2000-09-26-08-M18
On Linux RedHat6.2 build 2000-09-27-08-M18 you dont have to dismiss the alert
box to see the change but there is a 1/2 second delay.
| Assignee | ||
Comment 8•25 years ago
|
||
Although the dialog does have correct value, with IE and Nav the checkbox has a
check in it when the dialog appears, in Moz it doesn't show a check until the
dialog is dimissed. Futuring for to be fixed in next release.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
Comment 9•25 years ago
|
||
Testing this on WinNT 4.0 SP4 using Commercial 2000091805, I'm not seeing the
JavaScript alert display the wrong value. What I'm seeing is that the alert
displays the correct, post-change value, even though the box's visual display
hasn't updated yet. So this seems to be a cosmetic issue about the speed at
which the visual appearance is being updated rather than the DOM returning the
wrong value (which would be more serious). Or is the problem specific to a
single platform?
For now, it seems appropriate to Future this. If JavaScript were clearly
returning the wrong value, that would be a much more serious concern. If the
issue is now (or always was) simply the speed of updating the visual appearance,
the summary should be changed to reflect this.
Summary: checkbox.checked returns wrong → checkbox.checked returns wrong (or there's time delay in displaying updated checkbox?)
Whiteboard: [need info] need clarification of what the real problem is at this point
Comment 10•25 years ago
|
||
I got this update message from Federico by email. Federico, the Mozilla build
you're using is older than the Commercial build I used by about a month. Could
you please retest using a recent Mozilla daily build on Win2000 so we can figure
out whether:
a) I'm not seeing the bug because it's Win2k-specific
b) I'm not seeing the bug because it's been fixed since the build you used
Also, please post all updates about bugs directly in the bug report
itself so it's archived for all to see. Thanks!
sorry for disturbing you, but I wish to point out that on W2000
Professional, with M17 milestone built (Built ID: 2000080712) the alert DOES
display the result wrong, so it is not just a cosmetic issue, but it is much
more serious.
Moz doesn't show a check until the dialog is dimissed, axactly as Rods
wrote.
in the test case,
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=14867
clicking twice on the checkbox, with M17 I get 'false', then 'true',
while IE, for example, correctly reports 'true', and then 'false'
hope this could help,
best regards
Federico Sasso
| Assignee | ||
Updated•25 years ago
|
Summary: checkbox.checked returns wrong (or there's time delay in displaying updated checkbox?) → [CHK]checkbox.checked returns wrong (or there's time delay in displaying updated checkbox?)
| Reporter | ||
Comment 11•25 years ago
|
||
btw, it now works for me with build 2000101014 and W2000 (even if Moz it
doesn't show a check until the dialog is dimissed)
| Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 12•25 years ago
|
||
this is now fixed as part of a different checkin
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 13•25 years ago
|
||
Verifying on 2000-01-12-04-Mtrunk
Updated•7 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
•