Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MediaQuery] Foundation.MediaQuery.current return undefined in Firefox #11563

Closed
geosigno opened this issue Oct 26, 2018 · 3 comments
Closed

Comments

@geosigno
Copy link

Since the 6.5.0.rc-4 (at least); it seems the media query are not working anymore on Firefox.

import { Foundation } from 'foundation-sites/js/foundation.core';
import { MediaQuery } from 'foundation-sites/js/foundation.util.mediaQuery';

Foundation.MediaQuery = MediaQuery;

Foundation.MediaQuery._init();

console.log(Foundation.MediaQuery.current);

On chrome it print 'xxxlarge', but in firefox it prints 'undefined'. I am pretty sure it is the same on IE.

@DanielRuf
Copy link
Contributor

Can you provide a working codepen so we can reproduce it against the latest RC?

@ncoden
Copy link
Contributor

ncoden commented Oct 26, 2018

Related to #10363.

@geosenna Please see the discussion after #10363 (comment).

@geosigno
Copy link
Author

Sorry mistake on me. My code was executing too soon, I guess the meta with media query was not loaded yet, so query was empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants