sexycidao / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

IE 10 Compatibility view - standards mode - word wrapping is lost (also applies to browser controls) #307

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using this file: http://resource.innerworkings.com/product_demo/test.html

The contents of the file are:

<!DOCTYPE html>
<html lang="en">
<head> 
    <title>ITest</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script src="//google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>    
</head>
<body> 
<h2>Code...</h2>
    <blockquote>
        <pre class="prettyprint" xml:space="preserve">&lt;td rowspan="3" class="image-cell"&gt;
    line 1
        indented line 2
    line 3
&lt;/td&gt;</pre>
    </blockquote>
</body>
</html>

Open the file in IE 10 and the file renders normally. So far so good.
Click F12 to open Developer Tools and
Switch Browser Mode to "IE10 Compat View". 

The browser page should re-load and the line breaks are gone!

This is a problem because pages loaded in web browser controls - specifically 
the web browser control hosted in Visual Studio 2012 defaults to compatibility 
view and renders the page without the line breaks.

Setting the X-UA-Compatible header to IE-edge does not make a difference.
The page is using the latest build of prettify.

If prettify is turned off, the word wrapping is correct!

Original issue reported on code.google.com by seamus.b...@gmail.com on 16 Aug 2013 at 1:20

Attachments:

GoogleCodeExporter commented 8 years ago
The user agent string of the browser inside Visual Studio is:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; 
.NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; 
InfoPath.3; MS-RTC LM 8)

This is the same as when Developer Tools is used to set Browser mode to IE10 
Compat View.

Original comment by seamus.b...@gmail.com on 16 Aug 2013 at 2:32