Materialize: Scrollspy target is not accurate anymore (0.96.0)

Created on 2 Apr 2015  Â·  16Comments  Â·  Source: Dogfalo/materialize

Self-explanatory, see screenshot:

image

There is a big gap when clicking on any Scrollspy link.

Most helpful comment

Thank you for the answer. Unfortunately I don't think it is natural or intuitive. I will look for a way to bring it back below my fixed header.

All 16 comments

It is actually meant to be like that so the item is more centered and will not conflict with any type of fixed header.

Thank you for the answer. Unfortunately I don't think it is natural or intuitive. I will look for a way to bring it back below my fixed header.

We will add it in as an option
On Apr 3, 2015 1:51 PM, "Vincent Morneau" [email protected] wrote:

Thank you for the answer. Unfortunately I don't think it is natural. I
will look for a way to bring it back below my fixed header.

—
Reply to this email directly or view it on GitHub
https://github.com/Dogfalo/materialize/issues/1080#issuecomment-89374089
.

Any idea how one would fix this? It's essentially ruined the relative links on our frontpage.

Fixed it... For anybody who was wondering, you must change the ScrollTop option for scrollspy in the javascript file.

Yup. As of 0.96.0, I had to put these values in comment in scrollspy.js :

image

image

Works perfectly, until Dogfalo adds it as an option.

I'm glad that this has been mentioned. How about a callback option? instead of scrollfire. Because I want to fire callbacks more than once.

+1 add this as an option! Thanks @vincentmorneau and @TheAdamGalloway!

Thanks Saved My life!

I'm using the materialize ruby gem so editing the JS is not really an option for me. Any idea what can I do?

Over a year on, this is still an issue for me. I have to edit the JS file each time I update.

@TheAdamGalloway Me too...

Thanks for the tips guys! Worked perfectly :)

What do you think of my PR ?

Looks good to me, @NitroBAY

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onigetoc picture onigetoc  Â·  3Comments

SoproniOli713 picture SoproniOli713  Â·  3Comments

heshamelmasry77 picture heshamelmasry77  Â·  3Comments

ReiiYuki picture ReiiYuki  Â·  3Comments

PhillippOhlandt picture PhillippOhlandt  Â·  3Comments