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

Sticky Top Bar not working after 6.5.3 #11924

Closed
ecabuk opened this issue Dec 6, 2019 · 12 comments · Fixed by #11925
Closed

Sticky Top Bar not working after 6.5.3 #11924

ecabuk opened this issue Dec 6, 2019 · 12 comments · Fixed by #11925

Comments

@ecabuk
Copy link

ecabuk commented Dec 6, 2019

What should happen?

Top bar should be sticky when page scrolled.

What happens instead?

Nothing.

Test Case and/or Steps to Reproduce (for bugs)

I was following to tutorials on the documentation and I couldn't manage to work sticky top bar. Then I downgraded 6.4.3 and it started to work.

Here is the test case, I only changed the version numbers.

Foundation 6.4.3 (Working)

https://codepen.io/ecabuk/pen/JjoYNMq

Foundation 6.6.0 (Not working)

https://codepen.io/ecabuk/pen/LYEpyew

@DanielRuf
Copy link
Contributor

@DanielRuf
Copy link
Contributor

Seems to work here: https://codepen.io/DanielRuf/pen/KKwdmOx?editors=1010

@DanielRuf
Copy link
Contributor

Works here too:

https://codepen.io/DanielRuf/pen/XWJmgWL

@DanielRuf
Copy link
Contributor

@DanielRuf
Copy link
Contributor

@DanielRuf DanielRuf changed the title Sticky Top Bar not working after 6.4.3 Sticky Top Bar not working after 6.5.3 Dec 6, 2019
@DanielRuf
Copy link
Contributor

Found the culprit using git bisect.

git bisect bad
3fb505600fa8e61e7ef76c5f6b8b999650f99192 is the first bad commit
commit 3fb505600fa8e61e7ef76c5f6b8b999650f99192
Author: Nicolas Coden <nicolas@ncoden.fr>
Date:   Mon Aug 6 23:55:30 2018 +0200

    fix: validate "MediaQuery.is()" input and returns an error for invalid modifiers

 js/foundation.util.mediaQuery.js | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

@DanielRuf
Copy link
Contributor

Got this error:

Error: 
      invalid breakpoint passed to MediaQuery.is().
      Expected a breakpoint breakpoint name formatted like "<size> <modifier>", got "medium".

@kevinmu17
Copy link

kevinmu17 commented Dec 13, 2019

Updated to 6.6.1 but the problem is still here...

UPDATE:
i changed back and forth by commenting these 2 rules now it works magically :)

// require('foundation-sites');
import './lib/foundation-explicit-pieces';

@DanielRuf
Copy link
Contributor

Probably some cache.

@guyvanbael
Copy link

using 6.6.1 but issue is still there.
@kevinmu17 what file did you do your changes in?

@DanielRuf
Copy link
Contributor

@guyvanbael please provide the URL of the file that you have sued. On cdnjs the version 6.6.1 contains the code of 6.5.3.

@guyvanbael
Copy link

@DanielRuf my project was created using the cli.
<div data-sticky data-options="stickyOn: small; marginTop:1;" style="width:100%;" id="pageStart">
It seems to work when marginTop is set to 1, but then you have a margin of course. So i worked around it by adding an id and setting margin-top to 0

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

Successfully merging a pull request may close this issue.

5 participants