#769 closed bug (wontfix)
Checkbox's state is erased after wrap() or append() action (IE 6)
Reported by: | Mehdi Kabab | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | core | Version: | 1.1.3 |
Keywords: | wrap append | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
When you wrap a checkbox checked, check state is erased.
Testpage : http://gimp4you.eu.org/sandbox/js/test/wrap.html
(jQuery 1.0.4)
Attachments (2)
Change History (13)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Ok.
I had update the testpage for added prepend method test. The result is similar in IE 6 (with append method too).
comment:3 Changed 17 years ago by
Hi,
The testpage has been update for jQuery 1.1b I'm encoured always the bug in IE 6.
comment:4 Changed 17 years ago by
need: | → Test Case |
---|
comment:6 Changed 16 years ago by
Description: | modified (diff) |
---|---|
need: | Patch → Review |
The test for this seems to have changed since [1590]. It looks like the third test is testing for !checked but shouldn't it be checking for checked?
comment:7 Changed 16 years ago by
Owner: | set to brandon |
---|
comment:8 Changed 16 years ago by
Keywords: | append added |
---|---|
Milestone: | → 1.1.4 |
Summary: | Checkbox's state is erased after wrap() action (IE 6) → Checkbox's state is erased after wrap() or append() action (IE 6) |
Version: | → 1.1.3 |
comment:9 Changed 16 years ago by
This is an IE6 bug in the way it handles functions like appendChild. IE6 clears the "checked" property (even from children) during these functions. This is shown by the second button in the new test case. It really isn't a wrap issue at all except that wrap calls appendChild eventually.
The only real fix I see at this point is to save the state of the elem.checked and all its children and after the appendChild set them correctly if necessary. That is what the patch does and it fixes the test case. Unfortunately IE6 is likely to see a speed hit since it is necessary to recurse down any tree moved saving the checked values. I'm not sure it's worth it.
comment:10 Changed 16 years ago by
Milestone: | 1.1.4 → 1.2.2 |
---|
comment:11 Changed 16 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm very concerned about the performance hit involved with fixing this issue. The work around is to store the value of the inputs before and restoring the values after wrapping or appending.
FYI, this issue is fixed in IE7, but an IE6 fix doesn't appear to be that difficult to implement.