ded / bonzo

library agnostic, extensible DOM utility
Other
1.32k stars 137 forks source link

strange bug with checkboxes #28

Closed jrivero closed 13 years ago

jrivero commented 13 years ago

Hi, Today I found a strange behavior with checkboxes...

1- Preparing some checkboxes...

<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked">
<input type="checkbox" checked="checked">

2- Test this code for uncheck all and result is OK

$("input[type='checkbox']").removeAttr('checked')

3- Test this code for check all and result is OK

$("input[type='checkbox']").attr('checked', 'checked')

4- Now, change some of the checkboxes manually, and repeat step 2 and 3... only change I have not touched manually

I tested this issue on chrome and firefox with same results.

The test with jquery is ok.

Is a possible error of qwery, not finding the elements that change...

ded commented 13 years ago

that's pretty awesome... and really weird. especially given that all the results come back from $("input[type='checkbox']") but it's not checking them.

i'll have a poke around