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

Magellan with data-offset does not trigger correctly on the first item #11754

Closed
3 tasks done
mingyeungs opened this issue May 20, 2019 · 2 comments
Closed
3 tasks done

Comments

@mingyeungs
Copy link

What should happen?

Magellan with data-offset should should be triggered at offset positions

What happens instead?

All menu items, but not the first one, is triggered at the correct position.

Possible Solution

update /js/foundation.magellan.js line 170:

from
if(newScrollPos < this.points[0]){ /* do nothing */ }

to:
if(newScrollPos < this.points[0] - this.options.offset - (isScrollingUp ? this.options.threshold : 0)){ /* do nothing */ }

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

Test Case: https://codepen.io/mingyeungs/full/oRerpB

Your Environment

  • Foundation version(s) used: 6.5.1
  • Browser(s) name and version(s): Chrome 74.0.3729
  • Device, Operating System and version: macOS High Sierra (10.13.4)

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.
@JPustkuchen
Copy link
Contributor

Yup, we can confirm this problem! Any chance to fix this?

@thomasfrobieter
Copy link

I can confirm that @mingyeungs fix works fine!

thomasfrobieter added a commit to webksde/foundation-sites that referenced this issue Jul 9, 2020
thomasfrobieter added a commit to webksde/foundation-sites that referenced this issue Jul 9, 2020
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

4 participants