Ticket #2528006 (accepted defect)
ReporterSteve Calvert |
Opened: 05/17/09 Last modified: 02/18/10 Status: accepted Type: defect |
Owner Matt Sweeney |
Target Release: 2.NEXT Priority: P3 (normal) |
|---|---|---|---|
| Summary: | YUI Selector fails in IE8 Compatibility mode | ||
| Description: | By default when running against sites in your intranet zone IE8 switches to IE8 Compatibility Mode. Bu default when running against any other website on the internet IE8 switches to run in IE8 We have some code that is using the YUI selectors utility. These do not work correctly in the IE8 Standards Mode but do in IE8 Compatibility Mode. We also are using the meta tag to emulate IE7, which seems to have little effect here. An example of some code that is failing: var selectedImage = $$('div.on img.display')[0]; The above returns null or undefined in IE8 (I can't remember which) when in Standards Mode. This code succeeds in FF2/3, Safari, IE6/7. |
||
| Type: | defect | Observed in Version: | 2.7.0 |
| Component: | Selector | Severity: | S3 (normal) |
| Assigned To: | Matt Sweeney | Target Release: | 2.NEXT |
| Location: | Priority: | P3 (normal) | |
| Tags: | IE8 selector | Relates To: | |
| Browsers: | IE 8.x | ||
| URL: | |||
| Test Information: | |||
Change History
|
Posted: 05/18/09
|
|
Posted: 05/19/09
|
|
Posted: 05/26/09
Compatibility View and the X-UA-Compatible tag are not equivalent via http://blogs.msdn.com/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx raw: if (YAHOO.env.ua.ie && YAHOO.env.ua.ie < 8) { // rewrite class for IE < 8 fixed:if(YAHOO.env.ua.ie && ((!document.documentMode && YAHOO.env.ua.ie<8) || document.documentMode < 8)){// rewrite class for IE < 8 |
|
Posted: 02/18/10
it's still an issue in YUI 2.8.0, kaven's patch works for me |


Lajos Koszti
I need to clarify some of the details of this ticket, as they are incorrect.
1. It seems that the selector utility is failing in Standards Mode, not Compatibility Mode.
2. The code snippet supplied is a bit difficult to understand. The YAHOO.util.Selector.query function is mapped to $$ for convenience. This isn't clear in my code above.