-
Notifications
You must be signed in to change notification settings - Fork 862
Linking to an anchor tag on different post/page prevents scrolling up #887
Comments
@ehrhino try removing the "sticky" behavior from the menu and see if that changes anything. |
@colin-marshall Just tried that, but to no avail. Here's what it is: I also tried commenting out the stickyfooter.js , but that didn't work either :/ |
@ehrhino try removing all custom JS and also remove all the html markup that has to do with sticky. |
@colin-marshall
and it's closing tags in footer.php then the issue was solved...leading me to believe it's something with the off-canvas js (which I use for the mobile menu). |
Good find! I will see if there are any similar bug reports in Foundation. |
@colin-marshall any luck? Did some poking around myself, but couldn't find anything. |
I'm unable to reproduce this error. Is this still an issue? If yes, can you please try to reproduce with the latest version of FoundationPress (it has been updated to use Foundation 6.4.1). If no, can you please close the issue? :) |
Can't find anything about this online or the general Foundation docs, so wondering if anyone here has run into this/has ideas on how this can be fixed.
How can this bug be reproduced?
This happens anywhere there is a link going to an anchor tag on another page or post. The above is just an example.
What did you expect to happen?
You should be able to scroll up to see the above content, etc as a normal page would function. I'm guessing that this has something to do with how foundationpress sizes the page to fit the window. No idea, though. Issue does not occur when linking to an anchor tag on the same page.
I am using a js snippet to smooth scroll to anchor tags, but I've commented that out and the issue still persists. I'll include it though in case.
$('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top }, 500); return false; } } });
Thanks for any help you all can offer!
Please List the Following:
The text was updated successfully, but these errors were encountered: