Please tell me that I'm crazy, or that my installation of IE8 is broken somehow.
If I create a bare bones form that does almost nothing, IE renders the text in one size before pressing the submit button and then re-renders in a larger size after pressing the submit button. (example image below)
I was able to reproduce this by following these steps.
1) Create a new M开发者_如何学PythonVC 3 empty project, not using HTML 5 semantic mark up.
2) Create a new model, 2 strings and a boolean
public class Class1
{
public string string1 { get; set;}
public string string2 { get; set; }
public bool boolval { get; set; }
}
3) Create a controller, don't need to change anything here
public class Default1Controller : Controller
{
//
// GET: /Default1/
public ActionResult Index()
{
return View();
}
}
4) Create a new view on the index action of the above controller.
@model testproject.Models.Class1
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
@using (@Html.BeginForm())
{
@Html.EditorForModel()
<p><input type="submit" value="pressme" /></p>
}
5) Edit Global.asax.cs's MapRoute to use your controller
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Default1", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
6) Hit the "Play" (debug) button
When the page loads, everything looks fine. HOWEVER, If you hit the submit button, everything grows about one font size
If you edit out the references to the CSS file and jquery script file in _Layout.cshtml, the strange behavior continues. If you view the rendered source before and after submission, they're identical. If you view the page from IE8 by directly visiting the URL of your test site and NOT going through the debugger, the issue does NOT appear. And of course if you view the page from FF or Chrome, there's no issue there either.
Can anyone reproduce this? Am I going crazy? Or am I missing something?
are you sure you watching it in ZOOM 100%?
精彩评论