- This topic has 5 replies, 2 voices, and was last updated 5 years, 4 months ago by
David.
-
AuthorPosts
-
November 12, 2020 at 5:30 am #1528116
Dajuan
Hi GeneratePress team,
I’m running the latest version of GP along with WP-Rocket. On mobile specifically, the back-to-top button requires several presses before the user is taken back to the top. If I clear and de-activate WP-Rocket (and SiteGround memory caching) I do not have this issue. Is there a CSS/JS file that may need cache/minification/etc exclusion for optimal back-to-top button functionality on my site (mobile-specific)?
November 12, 2020 at 8:19 am #1528600David
StaffCustomer SupportHi there,
not come across that issue before.
You can try excluding:back-to-top.min.jsIts relative path is:
/wp-content/themes/generatepress/assets/js/back-to-top.min.jsNovember 12, 2020 at 9:07 am #1528687Dajuan
Thank you. I’ve excluded
back-to-top.min.jsbased on the relative path, however, the issue persists. Seems the display/screen needs to be clicked a time or two before the button activates.If there are any other scripts I should consider, please share.
I’ll continue testing in the meantime.
November 12, 2020 at 9:12 am #1528692David
StaffCustomer SupportI think the issue is because JS is being deferred.
Can you troubleshoot WP Rocket by disabling its options to see which one is causing the ‘conflict’November 12, 2020 at 9:59 am #1528739Dajuan
Thank you! WP Rocket recently enabled a feature called “Delay JavaScript execution”. I provided a screen capture below. It has some default JS inclusions, but I don’t see anything GP related. However, if I disable this feature the back-to-top functionality isn’t interrupted.

I’m going to reach out to the WP Rocket team about this.
Is there anything in WP Rocket’s default list of inclusions that is related to the back-to-top functionality?
November 12, 2020 at 2:54 pm #1529023David
StaffCustomer SupportTheres nothing in that list related to any GP script – they are all scripts that are loaded from a 3rd party resource – which it is common to defer / delay.
What it looks like is the loading of Delayed Scripts has been bound to interactive events such as onClick, so the first couple of clicks is what triggers them to load. Meaning the poor old back to top doesn’t get a look in until they’re loaded. -
AuthorPosts
- You must be logged in to reply to this topic.