varvet / serenade.js

Client side MVC framework
http://serenadejs.org
Other
524 stars 27 forks source link

radio buttons don't work in IE7 #60

Closed rosenfeld closed 12 years ago

rosenfeld commented 12 years ago

See the reason here:

http://www.webdeveloper.com/forum/showpost.php?s=e279045f66260eff691afef041417aba&p=1042470&postcount=4

IE (at least versions 6 and 7) has a bug: it is not able to set properly the name attribute on using DOM methods, in case of the elements (like radio groups) which must have the same name. Another bug: IE is not able to set some properties (like checked) unless the element is already appended to the parent.

That also explains that other bug with checkboxes in IE7.

if (isIE)
    e=document.createElement('<input type="radio" name="group">')
else {
    e=document.createElement('input');
    e.setAttribute('type','radio');
    e.setAttribute('name','group');
}
jnicklas commented 12 years ago

Closing this since we're dropping IE7 support.