RadioButtonFor doesn't resolve isChecked properly when nested in EditorTemplate #164
Labels
3 - Done
bug
cost: S
Will take up to 2 days to complete
PRI: 2 - Preferred
Preferably should be handled during the milestone.
up-for-grabs
Milestone
Problem
When using
RadioButtonFor
and specifying a default expression ofm => m
, the checked attribute isn't set as expected.While default expressions of
m => m
aren't generally used (or even valid at times, unless the call is nested under another model), they are distinctly valid and necessary in EditorTemplates when overriding a default template.Example
Models/IndexModel.cs
Controllers/HomeController.cs
Views/Home/Index.cshtml
Views/Home/EditorTemplates/Boolean.cshtml
Expected Output
Actual Output
Possible Solution
I believe this is caused by the following line:
AspNetWebStack/src/System.Web.Mvc/Html/InputExtensions.cs
Line 361 in 62d0b2d
I believe that this issue would be resolved if we replaced that line with the following:
The text was updated successfully, but these errors were encountered: