Scrollify icon indicating copy to clipboard operation
Scrollify copied to clipboard

Scrolling with sectionNam, deletes url segments to insert the hash value

Open rafatrace opened this issue 7 years ago • 2 comments

Hi, nice work with the plugin. I have a problem though, when I am in a page, like for example http://localhost/website/pt/about, after scroll everything works fine except that the current href link changes to this:

http://localhost/website/#projects

instead of changing to:

http://localhost/website/pt/about/#projects

I've tried adding a slash to the end of the url, but it kept the behavior. Is this related with the base html tag?

Thanks

rafatrace avatar Nov 25 '16 18:11 rafatrace

It's an old issue but can this be fixed one day please? It prevents from using the script under all URLs except the root one. It is caused by this line:

https://github.com/lukehaas/Scrollify/blob/master/jquery.scrollify.js#L133

Should be fixable by:

- history.replaceState(null, null, names[index]);
+ history.replaceState(null, null, window.location.pathname + names[index]);

qzminski avatar Jul 23 '18 13:07 qzminski

@lukehaas would you be that kind and check if this can be fixed anytime soon?

qzminski avatar Sep 28 '18 14:09 qzminski