Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE8 x-ua compatible mess #1

Closed
vvo opened this issue Jan 20, 2010 · 4 comments
Closed

IE8 x-ua compatible mess #1

vvo opened this issue Jan 20, 2010 · 4 comments

Comments

@vvo
Copy link

vvo commented Jan 20, 2010

Hello, dunno if this is a jquery bug or jquery onhashchange bug, i'll explain :
when a user activates compatibility mode in IE8 (so manual modification), jQuery.browser.version do report "7.0".
but if the website force ie7 mode (with meta http-equiv="X-UA.. content="IE=EmulateIE7), jQuery will report "8.0"

As you can see, the code from jquery-hashchange will fail here if the website uses the meta way. Because it'll try to use native onhashchange event wich will not be available when emulating ie7.

I know jQuery doesn't want to make fancy things on jQuery.browser, that's why i'm adressing the bug to jquery-hashchange

There's an easy workaround, just test document.documentMode wich will report good versions in both cases : "7.0" when the browser is in compatibility mode (manual way) or forced by a meta. Also it will report 8.0 if in normal mode

What do you think ?

source : http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx

@cowboy
Copy link
Owner

cowboy commented Jan 21, 2010

Can you set up a test page where an error occurs? I can't actually replicate the issue (even though everything I've read suggest it shouldn't work)!

@vvo
Copy link
Author

vvo commented Jan 21, 2010

Ok those urls should do it :

  1. enable compatibility mode then refresh : http://jsbin.com/anaro3 => IE version from jquery : 7
  2. remove jsbin.com from you compatibility mode websites (in tools > compatibility mode params) sorry my browser is in french atm so not sure about the labels
  3. restart browser and go here :
    http://jsbin.com/udise/4
    browser version from jquery : 8 (compatibility mode is forced with meta tag)

only document.documentMode will give you the appropriate version (you can test it in the js console of ie developper tools)

Be carreful because as soon as you activate compatibility mode by hand, it will always work as you expect ("7.0")

@cowboy
Copy link
Owner

cowboy commented Jan 21, 2010

I've just released v1.1, can you try it and see if the problem is resolved?

@vvo
Copy link
Author

vvo commented Jan 21, 2010

Works perfectly thanks good work !

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants