ID:2208807
 
Resolved
CSS didn't load correctly in some files in the browser control.
BYOND Version:511.1372
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 51.0
Applies to:Dream Seeker
Status: Resolved (511.1373)

This issue has been resolved.
Descriptive Problem Summary:

The X-UA-Compatible tag being present in an HTML window will break external stylesheet loading (aka tags). Note that they do still appear in the cache, the UI just refuses to actually render them or even seemingly load them into memory.

Numbered Steps to Reproduce Problem:

1. Include the snippet
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
</head>
in an HTML interface; whether this be by browse('file.html') or what have you.

2. Also include the snippet
<link rel="stylesheet" type="text/css" href="stylesheet.css">
, making sure to of course actually have a file named "stylesheet.css" that is correctly sent to the client via browse_rsc.

3. Observe that any properties in the stylesheet do not appear.

4. Remove the X-UA-Compatible tag from the tag and recompile.

5. Observe that the stylesheet loads and displays correctly.


Code Snippet (if applicable) to Reproduce Problem:

main.dm
/client/New()
src << browse_rsc('text.css', "text.css")
src << browse('text.html')
. = ..()


text.css
body {
background-color: #ff0;
}


text.html
<!DOCTYPE html>
<html>
<head>
<title>Css</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="stylesheet" type="text/css" href="text.css">
</head>
<body>

<h1>this should have yellow behind it but doesn't</h1>

</body>
</html>


Expected Results:
The X-UA-Compatible tag would only do what it is supposed to do; Display the window using the highest available IE mode.

Actual Results:
It breaks stylesheets.

Does the problem occur:
Every time? Or how often? Always, under 511.1372 and 511.1371
In other games? I have tested it with both Space Station 13 and a small test project, so, yes?
In other user accounts? Yes.
On other computers? Yep.

When does the problem NOT occur?
In any UI that does not have the X-UA-Compatible tag.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) It does not occur in 511.1370 and any earlier versions.

Workarounds:
Don't use the X-UA-Compatible tag; However, this is infeasible, as it is the only way to use HTML5 in a UI.
Good find. I'll get in a fix for this shortly.
Lummox JR resolved issue with message:
CSS didn't load correctly in some files in the browser control.