Closed
Bug 27063
Opened 26 years ago
Closed 26 years ago
radio buttons & checkboxes don't maintain state when the frame goes away
Categories
(Core :: XUL, defect, P3)
Core
XUL
Tracking
()
VERIFIED
FIXED
M14
People
(Reporter: alecf, Assigned: rods)
References
Details
(Whiteboard: [PDT+] 2/15)
Attachments
(1 file)
|
1.08 KB,
text/plain
|
Details |
I have, in XUL:
<html:div style="display: none" id="noframe">
<html:input type="checkbox" name="test1"/> test 1
</html:div>
if I write this javascript:
document.controls["test1"].checked = true;
document.getElementById("noframe").style.display = "block";
then test1 is not checked when it appears. If I switch the order of these
statements, the checkbox is checked.
I believe this is just like the problem we were having with gfx text widgets
where their value won't save/restore out of the frame correctly, and doing a
similar operation on gfx text widgets seems to behave correctly.
I'm cc'ing hyatt because he may know more about this, or at least how to solve
it.
I'm investigating as well. I really really want this bug fixed (because I have
to do some TERRIBLE hacks in the mail account manager to work around this) so I
am willing to even do the work if someone just spends 5 minutes to me at the
right code and an example of how the gfx text frame does it.
| Reporter | ||
Comment 1•26 years ago
|
||
actually, looks like all the work has been done, I guess it's just a bug in the
implementation.
| Reporter | ||
Comment 2•26 years ago
|
||
attaching a test case
this makes it really really easy
| Reporter | ||
Comment 3•26 years ago
|
||
Comment 4•26 years ago
|
||
I'll take it. I know what's wrong.
Status: NEW → ASSIGNED
Target Milestone: M14
Comment 5•26 years ago
|
||
Re-assigning this to Hyatt...
Assignee: nisheeth → hyatt
Status: ASSIGNED → NEW
Comment 6•26 years ago
|
||
I spoke too soon. It looks like the code (from the pres state perspective at
least) is set up correctly. Maybe it's a problem with the checkbox frame.
Status: NEW → ASSIGNED
Comment 7•26 years ago
|
||
Alex, can you work around your problem by using visibility: collapse instead of
display: none? You'll get better performance if you use visibility: collapse
anyway, since you won't be destroying the layout frames.
Comment 8•26 years ago
|
||
Another interesting frame interaction bug. Scoped it out for ya, rod. What's
happening in this case is that the checkbox restores its state properly from the
presState, and life is good... but then we hit a function called
PostCreateWidget, and it goes off and gets the default checked state from the
input element... and then subsequently blows away any value you've previously
restored via the history/pres state.
I bet the same thing is happening for radio buttons, although I didn't verify
yet. This should be pretty easy to fix.
Reassigning to rod.
Assignee: hyatt → rods
Status: ASSIGNED → NEW
Comment 9•26 years ago
|
||
Thanks for the awesome test case, btw, Alec. Made it real easy to debug.
| Assignee | ||
Comment 10•26 years ago
|
||
Yes, thanks for the test case. Fix is in my tree
Status: NEW → ASSIGNED
Whiteboard: fix is in my tree
| Assignee | ||
Comment 11•26 years ago
|
||
Checkboxes are fixed, but the state of the which radio button is clicked
within the radio group is still messed up
Whiteboard: fix is in my tree
| Assignee | ||
Comment 12•26 years ago
|
||
This should be a PDT+ or PDT-, if script manipulates checkboxes and radiobuttons
while they are hidden it doesn't work.
Keywords: beta1
| Assignee | ||
Comment 13•26 years ago
|
||
This is a the same problem as bug 21945 and it is a PDT+
| Assignee | ||
Comment 15•26 years ago
|
||
One last small thing to fix and then I can close this out, should be able to do
that today.
Whiteboard: [PDT+] → [PDT+] 2/15
| Assignee | ||
Comment 16•26 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 17•26 years ago
|
||
Updating QA contact.
Comment 18•26 years ago
|
||
verified with my soon to be x-roomies excellent test case 2/18
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: paulmac → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•