4
votes

So I have a GWT application that works perfectly in IE6-8, and most all modern browsers. Unfortunately, due to a known bug in how IE9 handles onchange events on <select> elements, it's pretty much unusable in IE9.

So instead of having our clients downgrade to IE8, I had the brilliant idea of having IE9 emulate IE8. I put this meta tag in my GWT host page:

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

When I look at the IE9 Developer Tools (F12), I see that it's "Browser mode" is IE9 and "Document mode" is IE8 standards. The GWT app doesn't load, though: it gives me a JavaScript error in one of the compressed and obfuscated JavaScript functions generated by GWT. I don't have the ability to debug into the app via IE so I can't figure out what's going on that way.

I suspect it has something to do with the way GWT detects which browser is being used and loads the appropriate resources for the session.

Edited to add: When I try to use IE=8 instead of IE=EmulateIE8, Developer Tools still reports a IE9/IE9 standards mode and all of the same onchange event issues are present as when I run in vanilla IE9.

Is there a working way to make IE9 emulate IE8 Standards mode in the way the http-equiv meta tag does, that works with GWT 2.4?

1
Have you tried IE8 instead of EmulateIE8? - Thomas Broyer
@ThomasBroyer -- Yes. I've updated my question. When I use IE=8, which is the correct syntax, the browser reports itself as being IE9 in standards mode and behaves accordingly (that is to say, my app doesn't work.) - Roddy of the Frozen Peas
Not very helpful, but what you are trying to achieve is to force IE9 work in IE8 compatibility mode for your GWT app. Which may or may not help you to solve this particular event handling issue. I mean, it still worth trying but doesn't guarantee the required behavior after all. Compatibility mode is mostly about rendering issues, as far as I understand it. - alexp
@alexp -- Yes, I know. Unfortunately for me I can't think of any other way to implement a fix that wouldn't require massive code overhauls, handwriting JavaScript, and/or forcing customers to downgrade their browsers (after I spent so long convincing them to upgrade from IE6, too!) - Roddy of the Frozen Peas
@Roddy: You say, it's a known IE 9 bug - I'm curious which one, do you have a link? - Chris Lercher

1 Answers

1
votes

I've had similar problem: IE ignored <meta http-equiv="X-UA-Compatible" content="IE=9"> tag (I was trying to prevent IE8 from displaying the page in IE7 compat mode). It was caused by not having X-UA-Compatible meta as the first child of <head>. I set it as the first child of <head> and added <!DOCTYPE HTML> on top of everything, and it worked.