- This topic has 21 replies, 2 voices, and was last updated 6 years ago by Tom.
-
AuthorPosts
-
April 9, 2018 at 4:58 pm #545830Andy
Hi,
Really loving the new built-in smooth scroll function which works perfectly on desktop. However, on mobile I’m finding any anchor links in the mobile menu scroll too far past the start of the target section.For example if you click on the FAQ link in the menu on desktop it scrolls to a perfect position at the start of the FAQ section. However, in mobile view it scrolls much further down passing the top third of the FAQ section. Is there any way around this?
Edit: I’ve just noticed the links seem to scroll correctly from the mobile sticky menu but not from the standard mobile drop-down menu.
April 9, 2018 at 5:28 pm #545842AndyAlso, I see the enquiry form / contact us menu links don’t quite scroll down to the target sections when you click them while on the Terms page.
April 9, 2018 at 9:21 pm #545951TomLead DeveloperLead DeveloperAh, I think it’s finding the offset to prevent the sticky nav from overlapping your content. However, it’s getting the height of the nav when open, which is causing the issue.
Let me know look into this a bit more – might need an update.
April 10, 2018 at 4:34 am #546177AndyThanks Tom, at first I thought it might have something to do with the sticky nav overlap but it seems to work ok on links within the sticky nav but not from the standard menu.
April 11, 2018 at 12:10 pm #547687AndyAny progress with this at all?.
April 11, 2018 at 9:00 pm #547955TomLead DeveloperLead DeveloperStill trying to figure out the best way to fix it. Will update this topic tomorrow 🙂
April 13, 2018 at 5:48 am #549302AndySorry to keep bothering you Tom, but any closer to a solution?.
April 13, 2018 at 11:19 am #549703TomLead DeveloperLead DeveloperI believe I have it fixed.
To test, replace the contents of
gp-premium/general/js/smooth-scroll.min.js
with this: https://pastebin.com/uK95XaFYApril 13, 2018 at 12:45 pm #549791AndyThank you, working perfectly on mobile now too.
The only thing that isn’t working quite as well is, when on a different page to the anchor links (e.g Terms), FAQ link works ok, but the Enquiry/Contact links don’t quite take you to the enquiry section. It kind of bounces back up from the bottom to the middle of the page.
I’m wondering if its because that section is right at the bottom of the page and there’s nowhere for the scrollbar to go. Any ideas?April 13, 2018 at 9:25 pm #550001TomLead DeveloperLead DeveloperThe Terms page is behind a password. Can you append it to the hidden URL in your original post so I can take a look?
April 14, 2018 at 4:28 am #550140AndyThe whole site uses the same password as the homepage, is it not working for you?
April 14, 2018 at 10:32 am #550371TomLead DeveloperLead DeveloperSee it now. Does that issue go away if you disable the Smooth Scroll script?
April 14, 2018 at 10:44 am #550384AndyUnfortunately not, I’ve disabled both Smooth Scroll and Sticky Nav and the problem remains, so it seems this is a seperate issue. I’ve left them disabled for you to see.
April 14, 2018 at 8:43 pm #550604TomLead DeveloperLead DeveloperI wonder if there’s something loading on the page a little late, causing the page to jump in height once it loads. Maybe the Google Map? Another element on the page?
April 15, 2018 at 5:43 am #550785AndyI tried removing the Google Map, the FAQ Accordion and even the form itself which means there is no extra JS being loaded, just standard GP sections and text/images but unfortunately it’s still happening.
I do notice that in mobile/tablet view it does seem to work better because there is more viewport height for it to scroll down through, so it doesnt do that jumping back up again. So I tried moving the whole contact us section up to just below the FAQ section and above the Services section and then it worked perfectly.
-
AuthorPosts
- You must be logged in to reply to this topic.