Side navigation
#769 closed bug (wontfix)
Opened January 09, 2007 02:51PM UTC
Closed December 08, 2007 05:10AM UTC
Last modified March 13, 2012 09:49PM UTC
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
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 (11)
Changed January 09, 2007 07:13PM UTC by comment:1
Changed January 10, 2007 09:11AM UTC by comment:2
Ok.
I had update the testpage for added prepend method test. The result is similar in IE 6 (with append method too).
Changed January 11, 2007 09:57AM UTC by comment:3
Hi,
The testpage has been update for jQuery 1.1b
I'm encoured always the bug in IE 6.
Changed March 24, 2007 05:41PM UTC by comment:4
need: | → Test Case |
---|
Changed March 25, 2007 12:32PM UTC by comment:5
need: | Test Case → Patch |
---|
Added test in [1590].
Changed May 16, 2007 03:46PM UTC by comment:6
description: | When you wrap a checkbox checked, check state is erased.\ \ Testpage : http://gimp4you.eu.org/sandbox/js/test/wrap.html\ \ (jQuery 1.0.4) → When you wrap a checkbox checked, check state is erased. \ \ Testpage : http://gimp4you.eu.org/sandbox/js/test/wrap.html \ \ (jQuery 1.0.4) |
---|---|
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?
Changed July 20, 2007 09:25PM UTC by comment:7
owner: | → brandon |
---|
Changed July 21, 2007 05:05AM UTC by comment:8
keywords: | wrap → wrap append |
---|---|
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 |
Changed November 06, 2007 11:06PM UTC by comment:9
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.
Changed November 27, 2007 07:58PM UTC by comment:10
Changed December 08, 2007 05:10AM UTC by comment:11
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.