Title: Problem with breakpoints?
Last modified: August 17, 2023

---

# Problem with breakpoints?

 *  Resolved [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/)
 * Hi there,
 * First off, I really enjoy using The Events Calendar.
 * I recently installed on this page and I’m seeing some strange behavior.
 * The List view initially loads with one view (I’m assuming it’s the desktop view).
   But, if I hit the back button or specifically click on List in the dropdown, 
   it changes to the mobile view with very large images. Then, if I click list again,
   it changes the view again back to the original.
 * I’ve tried to diagnose it and I think it’s related to how the breakpoints are
   implemented via javascript but I’m not 100% sure what’s causing the problem.
 * Can you look at the page and let me know if anything stands out?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-breakpoints%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/problem-with-breakpoints/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-breakpoints/page/2/?output_format=md)

 *  Plugin Support [tristan083](https://wordpress.org/support/users/tristan083/)
 * (@tristan083)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-16987673)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/) ,
 * Thank you for reaching out, and I’m sorry to learn of the difficulties.
 * A lot of these issues can be attributed to caching so I recommend we start with
   that. If you are using some caching mechanisms (i.e. Page Cache, Object Cache,
   etc.) try purging the cache and see if that helps.
 * Otherwise, the issue could be due to a conflict with third party plugins and/
   or themes. It would be good to test for conflicts. Could you follow the following
   steps?
    1. Deactivate all other plugins except for The Events Calendar Plugins.
    2. Switching to the[ Default theme](https://codex.wordpress.org/WordPress_Default_Themes).
 * Please read the [Testing for Conflicts Article](https://theeventscalendar.com/knowledgebase/k/testing-for-conflicts/)
   before doing anything. 
 * To be safe, we’d recommend conducting tests and updates on a [Staging Server](https://theeventscalendar.com/knowledgebase/k/creating-and-using-a-wordpress-staging-site/).
   Also, please keep a working backup of your website.
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-16998769)
 * Hi Tristan,
 * Thanks for your answer. I’m still trying to figure out where the conflict is 
   located. It appears to be a problem with the custom-built theme. I’m hoping you
   can point me in the right direction to help me narrow it down.
 * For some reason, the following classes disappear when I reload the /list/ page
   and it causes the page to display the mobile view even on desktop:
 *     ```wp-block-code
       tribe-common--breakpoint-xsmall tribe-common--breakpoint-medium tribe-common--breakpoint-full
       ```
   
 * Can you help me narrow down the function in the Events Cal plugin where the javascript
   loads these classes? I’m assuming it’s javascript but I’m not certain. Knowing
   that function could help me figure out the trail going back to the theme and 
   hopefully to the point of conflict. I appreciate everything you all are doing
   with this plugin. It’s worked great on other sites.
 *  Plugin Author [Sam](https://wordpress.org/support/users/sdokus/)
 * (@sdokus)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-16999513)
 * Hi there,
 * Thanks for your kind words! I would be happy to help you with this.
 * You should be able to add this Javascript to your custom theme, which will redefine
   the container of the page for the breakpoints:
 *     ```wp-block-code
       var container = document.querySelectorAll( '[data-view-breakpoint-pointer]' );
       if (container.length > 0) {
       window.tribe.events.views.breakpoints.setup( container ); 
       }
       ```
   
 * Additionally, if you use Chrome Dev tools to inspect your page, you can see where
   this script is being executed by going to the Sources tab, selecting the ‘index’
   page from the left hand menu, and then searching for ‘tribe-events-breakpoints’
 * Let me know if that helps or if you have any other questions.
 * Best,
   Sam
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17003411)
 * Thanks [@sdokus](https://wordpress.org/support/users/sdokus/) for that. I have
   added that script to the page and I can see where the ‘tribe-events-breakpoints’
   is firing. I still need to make the connection between that and the classes not
   loading.
 * Does the div that contains [data-view-breakpoint-pointer] mean that’s the container
   that Events Cal is looking for when it decides to render as mobile or desktop?
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17010098)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * > Does the div that contains [data-view-breakpoint-pointer] mean that’s the container
   > that Events Cal is looking for when it decides to render as mobile or desktop?
 * Yes, that is correct.
 * Let me know if you have further questions or concerns.
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17010125)
 * Great! Thanks [@d0153](https://wordpress.org/support/users/d0153/)!
 * So, it looks for that container and then what happens next? Does the number after
   the data-view-breakpoint-pointer do anything? Is there a specific function that
   is fired by the Events Calendar based on something in the container?
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17013604)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * From what I understand from the snippet code provided [here](https://wordpress.org/support/topic/problem-with-breakpoints/#post-16999513),
   it will check the current container’s width. If it falls under a mobile screen,
   then it will add a class for mobile, otherwise add a class for desktop.
 * I hope this helps, and please let me know if you have further questions or concerns.
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17013682)
 * _If it falls under a mobile screen, then it will add a class for mobile, otherwise
   add a class for desktop._
 * What’s the name of the function that adds the class?
    -  This reply was modified 2 years, 7 months ago by [Steppppo](https://wordpress.org/support/users/steppppo/).
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17016489)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * I think this is the function you’re looking for. _[See this [reply](https://wordpress.org/support/topic/problem-with-breakpoints/#post-16999513)]_
 *     ```wp-block-code
       window.tribe.events.views.breakpoints.setup( container ); 
       ```
   
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17017035)
 * [@d0153](https://wordpress.org/support/users/d0153/) Darian – I believe that 
   bit of javascript is for finding the container that Events Cal will use to calculate
   the width so that it knows what classes to add (or not).
 * I need to know the function that is adding these classes to the page:
 *     ```wp-block-code
       tribe-common--breakpoint-xsmall tribe-common--breakpoint-medium tribe-common--breakpoint-full
       ```
   
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17019340)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * I just tested it on my side and by running the script, it will add necessary 
   class to the container.
 * See- [https://share.getcloudapp.com/jku62dY2](https://share.getcloudapp.com/jku62dY2)
 * I hope this helps, and please let me know if you have further questions or concerns.
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17019488)
 * But if you try to refresh the page, the classes disappear. That’s the behavior
   I’m trying to eliminate. I need to know what function is adding the classes. 
   It’s not that snippet.
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17028252)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * Thanks for your message.
 * I tried refreshing the page, but the classes are showing on my end. Only by changing
   the views to Month or List views, then the classes disappear.
 * Let me check with the team with this, and I’ll get back to you as soon as I know
   more.
 *  Thread Starter [Steppppo](https://wordpress.org/support/users/steppppo/)
 * (@steppppo)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17031142)
 * Thanks [@d0153](https://wordpress.org/support/users/d0153/) Darian. I appreciate
   it.
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/#post-17036773)
 * Hi [@steppppo](https://wordpress.org/support/users/steppppo/)
 * I have contacted the team for an update and will promptly inform you as soon 
   as I receive a response from them.

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/problem-with-breakpoints/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/problem-with-breakpoints/page/2/?output_format=md)

The topic ‘Problem with breakpoints?’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 26 replies
 * 4 participants
 * Last reply from: [Darian](https://wordpress.org/support/users/d0153/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/problem-with-breakpoints/page/2/#post-17140038)
 * Status: resolved