You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you first load a page, mediaCheck goes into every media query, even if it’s not relevant, which then triggers an exit event. (e.g. media: '(min-width: 64.063em)' is entered even if the browser width is less than 64.063em). I had to get around it by setting a flag and using it in all of the exit functions (if (vInitialCheck) return;) except for the last one, where I reset the flag (if (vInitialCheck) {vInitialCheck = false; return;} Is there a way to add this to the main code? I don't think functions should ever get run unless you actually are in a valid media query for the browser size.
The text was updated successfully, but these errors were encountered:
When you first load a page, mediaCheck goes into every media query, even if it’s not relevant, which then triggers an exit event. (e.g. media: '(min-width: 64.063em)' is entered even if the browser width is less than 64.063em). I had to get around it by setting a flag and using it in all of the exit functions (if (vInitialCheck) return;) except for the last one, where I reset the flag (if (vInitialCheck) {vInitialCheck = false; return;} Is there a way to add this to the main code? I don't think functions should ever get run unless you actually are in a valid media query for the browser size.
The text was updated successfully, but these errors were encountered: