Archived topic
'Scroll to the top' button and hyperlinks do not work on mobile
5 replies · Started by lemonrockcompany on July 13, 2022
Hi. On mobile, there are several items that do not 'load' or do not work
- 'Scroll to the top' not loading
- All hyperlinks do not work
- Menu button (hamburger) does not work
Note, desktop works fine.
Hello there,
From my end, they seem to be working as expected.
Also tested on my personal phone to be sure, and they’re working there as well.
Can you try clearing the cache of your mobile’s browser or try using a different mobile phone to test?
Kindly let us know how it goes.
Hi. I think I solved it via WPRocket. Turned off the Delay JavaScript execution and seems to resolve all issues.
Just need to figure out which JavaScript files to exclude.
I see. Try this recommendation by David: https://generatepress.com/forums/topic/scroll-to-the-top-button-and-hyperlinks-do-not-work-on-mobile/#post-2282171
exclude generatepress/assets/js/back-to-top.min.js as well
Thanks for the exception file name for the 'back-to-top'. Can you provide me the file name for the following 2 items.
1) Menu (hamburger)
2) Hyperlinks that are on a post? For example, the Logo on top of mobile links to homepage, the in-line text, the jump links. All links on-page do not seem to work, unless I disable the 'Delay JavaScript'
Hi there,
1. This script is required for menu and is loaded by default:
generatepress/assets/js/menu.min.js
You also have the Navigation search which uses this script:
Navigation Search: generatepress/assets/js/navigation-search.min.js
2. Links in the post, aside from the Smooth Scroll option in GP, which you don't have enabled by the looks of it, there is no scripts in GP that interfere with those. If that issue persists, then its more likely a plugin such as ToC or an analytics script that is scraping links.