Download & Extend

Responsive layout class defaulting to 'mobile' rather than the primary.

Project:Omega
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Hey folks,

Been having a hell of a time with IE7 and Omega, and I've tracked down one of my biggest issues being that the responsive-layout-xyz class that is getting added isn't the primary (Which is what I'd expect omega to fall back on) but mobile. Tracked it down to the following bit of code in setCurrentLayout, in omega-mediaqueries.js:

current = Drupal.settings.omega.layouts.order.hasOwnProperty(index) ? Drupal.settings.omega.layouts.order[index] : 'mobile';

Changed it to:

current = Drupal.settings.omega.layouts.order.hasOwnProperty(index) ? Drupal.settings.omega.layouts.order[index] : Drupal.settings.omega.layouts.primary;

Maybe I've misunderstood what this function is meant to do, but it seems to me it should always fall back on primary rather than mobile. Attached below is the patch with the above code.

Comments

#1

Status:active» needs review
AttachmentSizeStatusTest resultOperations
omega-default-responsive-layout-1922838-1.patch761 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 0 pass(es).View details | Re-test

#2

Status:needs review» needs work

Scratch that, this definitely is not having the intended effect. It fixed my issue in IE, but is adding the default layout class in situations where I wouldn't want it.

#3

Status:needs work» needs review

After spending some more time looking at this one, I figured out what it's intended to do. As far as I can tell, it should have worked with the (lt IE 9) fallbacks, but it just wasn't working for me until I added !important to the IE fallback z-index styles. Attaching a patch that does that.

AttachmentSizeStatusTest resultOperations
omega-default-responsive-layout-1922838-2.patch1.54 KBIdlePASSED: [[SimpleTest]]: [MySQL] 0 pass(es).View details | Re-test

#4

Attaching a patch that will apply to the current 3.x release. Looks like there's some whitespace differences that would cause the patch to not apply.

AttachmentSizeStatusTest resultOperations
omega-default-responsive-layout-1922838-4.patch1.56 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch omega-default-responsive-layout-1922838-4.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#5

Status:needs review» needs work

The last submitted patch, omega-default-responsive-layout-1922838-4.patch, failed testing.

#6

This did the trick, thanx!

nobody click here