Opened 10 years ago

Closed 10 years ago

#4555 closed Bug (fixed)

Web UI broken in IE9

Reported by: reardon Owned by: jordan
Priority: Normal Milestone: 2.50
Component: Web Client Version: 2.41
Severity: Normal Keywords:
Cc:

Description

Not sure what happened but IE9 thinks the page should be rendering in IE7 mode. The <!doctype html> looks proper, so some downstream script is forcing you into IE7-mode.

This is with 2.41 web ui.

Note also that common.css is being double-loaded.

Change History (11)

comment:1 Changed 10 years ago by reardon

I found the problem. Hosting provider is on the IE9 "Compatibility View" list. This means index.html will need to explicitly set IE9 (or IE8 or whatever) standards mode.

<meta http-equiv="X-UA-Compatible" content="IE=7,IE=8,IE=9">

The above line (without conditional) works well enough. I tested with Firefox and Chrome and it seems fine.

comment:2 Changed 10 years ago by jordan

  • Milestone changed from None Set to 2.50
  • Owner set to jordan
  • Status changed from new to assigned

Thanks for the patch!

comment:3 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Patch applied in r12969.

comment:4 Changed 10 years ago by jordan

  • Resolution fixed deleted
  • Status changed from closed to reopened

reardon, I did some more reading up on this meta tag after validator.w3.org complained about it. I've removed the tag in r12985, but I think we needed that permissive mode to work around a couple of other errors in the file that are also fixed in the same commit.

Could you try a nightly/trunk build of r12985 or higher and see if it works in IE9 without that meta tag?

comment:5 Changed 10 years ago by reardon

No, the meta tag is required. It's dumb that the w3c validator complains about it, it's completely legitimate syntactically.

I would recommend just dumping IE7 support entirely if no one works on it; drop the IE7.css stylesheet and throw up a warning with a version check in the main script. For that matter, once you force the browser into standards-mode, the ieAll.css stylesheet is no longer required. It works great for IE9, I haven't checked IE8 yet. Remove the whole block:

<!--[if IE]>
    <link media="screen" href="./style/transmission/common.css" type="text/css" rel="stylesheet" />
    <link media="screen" href="./style/transmission/ieAll.css" type="text/css" rel="stylesheet" />
<![endif]-->
<!--[if IE 7]><link media="screen" href="./style/transmission/ie7.css" type="text/css" rel="stylesheet" /><![endif]-->

For what it's worth, the conditional inclusion of mobile.css is broken, it is always included even by clients that don't want or care about it. Not sure where you got the conditional syntax from. For a desktop browser, only two stylesheets should be loaded: common.css and jqueryui.css

comment:6 Changed 10 years ago by reardon

It's ironic that the very command (the <meta> tag) which makes IE much more compliant with the formal W3C standard is something that the w3c validator complains about. There is no "more standard" way of handling it. IE has a database of sites that it uses to decide to back off to non-standard mode, and this <meta> is the only way of overriding that list and forcing compliance. As these things go, and http-equiv is about as innocuous as it gets.

comment:7 Changed 10 years ago by jordan

ie7.css + ieAll.css removed, and <meta> reinstated, in r12987.

comment:8 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

...fails miserably in IE8 without explicitly loading common.css inside the "if IE" block.

Reinstated

<!--[if IE]>
<link media="screen" href="./style/transmission/common.css" type="text/css" rel="stylesheet" />
<![endif]-->

in r12988

comment:9 Changed 10 years ago by reardon

Change to

<!--[if IE 8]>

otherwise common.css gets needlessly double-included by IE9.

As stated above, the conditional used for including mobile.css only works for Chrome, it does not work in IE or Firefox or (I believe) Opera, so each of those will needlessly include mobile.css

comment:10 Changed 10 years ago by livings124

  • Resolution fixed deleted
  • Status changed from closed to reopened

Supporting multiple versions of IE is fun...

comment:11 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

Done in r12989. Thanks :)

Note: See TracTickets for help on using tickets.