I know I know - everyone hates IE7 and we really shouldn't be supporting it still - BUT - a lot of folk still have to - sad times.

Anyway - I've found an interesting issue in that IE7 is always picking up the 'mobile' layout. The issue seems to come from the fact that IE7 seems to think the z-index of the div with ID "omega-media-query-dummy" is -1, instead of 0 ...

The JS is correctly adding the CSS rules into the DOM - so we have the following rules in this order in our generated CSS

<STYLE media=all>#omega-media-query-dummy { position: relative; z-index: -1; }</STYLE>
<STYLE media=all>#omega-media-query-dummy { z-index: 0; }</STYLE>

However when we query the z-index property of the #omega-media-query-dummy using jQuery we get the value -1 when we should be getting 0.

Interestingly if I change the second line above to be

<STYLE media=all>#omega-media-query-dummy { z-index: 1; }</STYLE>

And then query the CSS z-index value I get the correct value of "1" - so it looks like some strange bug with IE7 not allowing z-index to be overridden with a value of 0 ... lovely!

I'm not sure how to progress this - hence raising the issue to see if anyone has a similar problem or any idea on a solution?

Cheers,

Mike

Comments

paulgendek’s picture

Quick and easy solution:

Remove the "omega-media-query-dummy" container on IE7 and below. The media queries are never processed and the layout defaults to "responsive-layout-normal".

if ($.browser.msie && parseInt($.browser.version) <= 7) {
	$('#omega-media-query-dummy').remove();
}
mdixoncm’s picture

Nice idea, but unfortunately a couple of issues.

1. Because the code in omega-mediaqueries.js that runs on the window.resize is using a jQuery element in a variable it looks like even though we remove the element from the DOM the variable still returns it's z-index property.

The code is

setCurrentLayout(dummy.css('z-index'));

Instead of

setCurrentLayout($('#omega-media-query-dummy').css('z-index'));

2. Even if you change the above code - with no #omega-media-query-dummy element you end up passing 'undefined' into the setCurrentLayout function - which causes it to fallback to layout-mobile - only by passing in a 0 will you force it to layout-normal

larowlan’s picture

Status: Active » Needs review
StatusFileSize
new1.2 KB

try this patch
will need a -p2 to apply from inside /omega (took this patch from my sites/xx dir)
Basically IE7 defaults to use the 0 style sheet. If you want this to be the normal one (not the narrow) make sure to reorder your weights.

mdixoncm’s picture

StatusFileSize
new1.15 KB

Awesome stuff - looks good so far - I've re-rolled against the correct directory as my folder structure is a little different from yours (have a /contrib folder under /themese) ...

cellar door’s picture

Assigned: Unassigned » himerus

*shudders at IE7 but agree that it could help some out*

markhalliwell’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Patch in #4 works perfectly. It also fixes #1299624: Equal Heights and IE8, IE7.

himerus’s picture

added to the 3.2 roadmap.

Tony Finlay’s picture

I've tried this patch on 7.x-3.1+4-dev and I'm still having the issue

Seems the patch never applied even though showing as successful in netbeans, added and removed necessary elements manually and issue is resolved, the patch above does indeed work.

fxarte’s picture

I tried the patch on #4 and did not work as expected.

fxarte’s picture

StatusFileSize
new1.56 KB

This new version of the same patch on #4 changes the parameter passed to setCurrentLayout() to

1

, as the value

0

sets the current value to fluid, and not normal.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, omega-ie7_1.patch, failed testing.

fxarte’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.07 KB

Sorry an alert() slip through.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, omega-ie7_2.patch, failed testing.

dwatts3624’s picture

I assume these latest patches are geared to fixing this issue but, in case not, I wanted to mention that the patch allows the site to call the correct style sheets in IE7 but responsivelayout thinks the current layout is narrow so any JS I have bound to it is triggering.

Still, the patch saved a lot of headache as it is. Luckily, the JS between normal and narrow isn't too different. ;)

Lajfi’s picture

just to let you know, i had the "equal heights" issue in IE8 and lower
patch in #4 did the trick

thank you mdixoncm

steinmb’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Assigned: himerus » Unassigned
Priority: Major » Normal
Issue summary: View changes