# Modern Tribe Events Calendar stuck in responsive with older Roots theme

**URL:** https://discourse.roots.io/t/modern-tribe-events-calendar-stuck-in-responsive-with-older-roots-theme/2397
**Category:** uncategorized
**Created:** 2014-10-17T14:36:16Z
**Posts:** 3

## Post 1 by @jmlumpkin — 2014-10-17T14:36:16Z

We use a much older version of Roots, before the theme wrappers, etc. Our problem is a bit different than the ones seen at [Roots and Modern Tribe's Events Calendar](http://discourse.roots.io/t/roots-and-modern-tribes-events-calendar/603) for example.

Our theme stays stuck in the ‘responsive’ view, due to how Roots and TEC enqueue scripts it appears.

We have tried using their customize\_tribe\_events\_breakpoint trigger, which sets the right number, but it never does anything (as in, I echo’d out the value, and its there, but their code seems to ignore it).

We have been getting support at [https://tri.be/support/forums/topic/calendar-displays-mobile-version-only/?un=1](https://tri.be/support/forums/topic/calendar-displays-mobile-version-only/?un=1) , but they consider it a Roots issue, as it works in every other theme on our setup.

If you read from [https://github.com/moderntribe/the-events-calendar/blob/056aca6f5887a3b2425a61ba6234e2e25b273683/lib/tribe-template-factory.class.php#L639](https://github.com/moderntribe/the-events-calendar/blob/056aca6f5887a3b2425a61ba6234e2e25b273683/lib/tribe-template-factory.class.php#L639) down to about line 700, you see how they enqueue, etc.

We are stuck on how to get around this. I am not sure if its the order things are getting set, etc.

---

## Post 2 by @jmlumpkin — 2014-10-17T14:46:00Z

Some debuging showed that the plugin (around line 688 in the link above) adds something like `media="only screen and (max-width: 768px)"` to the include. If I switch to another theme, this is included. If I am using Roots, this gets stripped out. What would cause that?

---

## Post 3 by @jmlumpkin — 2014-10-17T15:46:05Z

I found the issue, and created a fix. If anyone else runs into this, older versions of Roots used a roots\_clean\_style\_tag function ([https://github.com/roots/roots/blob/5.2.0/inc/cleanup.php#L607](https://github.com/roots/roots/blob/5.2.0/inc/cleanup.php#L607)). This would chop off the last part of the style tag, therefore removing the breakpoint that was needed. I added a new filter to allow this one through:

`elseif ($matches[3][0] === 'only screen and (max-width: 768px)'){ $media = ' media="only screen and (max-width: 768px)"';`

May make a minor update so it only checks for the first part of this, but it solved my issue.
