Ticket #7836 (closed bug: notabug)
IE7 & IE10: buttonset with radio buttons fails to select option
|Reported by:||audvare||Owned by:||audvare|
I know it may be early for IE10, but I have a set of radio buttons with the required attribute placed on all of them. This works great in IE8/9 (they ignore required as it is unsupported), Chrome, Safari and Firefox. I even tried Konqueror.
IE 7 APPEARS to select the option but $(':checked') selector returns 0.
IE10 supports the required attribute so when I hit submit it just pops up a box saying 'You must choose an option.'. I do want this box to appear should the user not pick anything (I have fallbacks for when the browser lacks validity checks in my code), but I do not want to have the same fallback for IE10 as I do with IE7 (which I do not believe is possible). Perhaps a regression on MS' part, but their validity check runs before any event listeners to form submit event preventing the same fallback for IE7 to work in IE 10.
The fallback for IE7 is to get the selected option by class via the clicked label, then get the .prev() radio button and set it to .prop('checked', true) before submitting.
On my site I'm using 1.8.11 but the jsFiddle is using 1.8.16.