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
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | omega-ie7_2.patch | 1.07 KB | fxarte |
| #10 | omega-ie7_1.patch | 1.56 KB | fxarte |
| #4 | omega-ie7.patch | 1.15 KB | mdixoncm |
| #3 | omega-ie7.patch | 1.2 KB | larowlan |
Comments
Comment #1
paulgendek commentedQuick 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".
Comment #2
mdixoncm commentedNice 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
Instead of
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
Comment #3
larowlantry 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.
Comment #4
mdixoncm commentedAwesome 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) ...
Comment #5
cellar door commented*shudders at IE7 but agree that it could help some out*
Comment #6
markhalliwellPatch in #4 works perfectly. It also fixes #1299624: Equal Heights and IE8, IE7.
Comment #7
himerus commentedadded to the 3.2 roadmap.
Comment #8
Tony Finlay commentedI've tried this patch on 7.x-3.1+4-dev and I'm still having the issueSeems 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.
Comment #9
fxarte commentedI tried the patch on #4 and did not work as expected.
Comment #10
fxarte commentedThis new version of the same patch on #4 changes the parameter passed to setCurrentLayout() to
, as the value
sets the current value to fluid, and not normal.
Comment #12
fxarte commentedSorry an alert() slip through.
Comment #14
dwatts3624 commentedI 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. ;)
Comment #15
Lajfi commentedjust to let you know, i had the "equal heights" issue in IE8 and lower
patch in #4 did the trick
thank you mdixoncm
Comment #16
steinmb commented