IE8 forces compatibility mode when inserting data into a div

此生再无相见时 提交于 2019-12-05 19:59:26

By forces it to reload in compatibility mode do you mean that you get a flyout balloon notification that says something like: "Internet Explorer encountered a problem with this page and has loaded it in compatibility mode"?

If so, that means you've hit a bug in IE. Called a "Hard assert" it means that the layout engine crashed (not an AV or anything exciting, it just got into an unrecoverable state) and thus IE tries to provide the user with some content by using the older layout engine.

If the problem still occurs in IE9, please file a bug at http://connect.microsoft.com/ie

thanks!

Have you ensured your DOCTYPE and X-UA-Compatible are correct

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

And add this just after the <head>

<meta http-equiv="X-UA-Compatible" content="IE=8">
Cyntech

After a colleague did some searching as well, we found this here on SO, where it's been confirmed that max-height is causing a hard assert in IE8, confirming that it is, indeed, a bug in IE8 as EricLaw posted.

We were using max-height for the style of the div we were inserting the content into, and in turn, causing the hard assert. The above linked question has a work around for anyone else encountering this problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!