Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Auto Scroll by pressing back button

  • Hi Team,

    Can you please check on this URL
    https://www.goodrxmedicine.com/cenforce-200.html
    This website is built with magento2, and there is a hyperlink on this button: https://ibb.co/nQzQLqd & after clicking this button, we will redirect to our WordPress website.
    After redirecting, when we hit the back button, our WordPress website will scroll down instead of going back.
    I will try after removing the cache. But the issue still exists.
    Can you please give a try too?

    Regards

  • Hi there,

    looks like a scripting error.
    Visit the blog post, and Right Click > Inspect the page to open the browser developers tools.
    Check the console tab and there you wll see several script errors. All look to be related to a CORS issue between your domain and CDN.
    Check with the host/CDN provider on how to fix those issues.

  • CORS error fixed without cache,
    But still same issue.

  • Can you disable the Back to Top button option in the Customizer > Layout > Footer.

  • Done

    Still same
    Please check private information for credentials

    Regards

  • OK, next disable the GP Smooth Scroll in Appearance > GeneratePress.
    Thats the only other script that would do something on a popstate event ( which is any change to the active browser history including the back button )

    Let us know.

  • Hello David,

    Still same

    Regards

  • OK, thats good as it eliminates the theme scripts that do any kind of listening to popstate events ( the JS event that happens on browser active history changes such as the back button ). Which means its another script on the page.

    There are 2 other scripts that are engaging on popstate events and those are in the GTM and Clarity scripts.
    But before you go there, considering the scroll position shifts. Remove any other plugins that affect scrolling eg. Fixed Widgets plugin.

    After that its a case of disabling other plugins and those tracking scripts to see which is the cause.

  • Thanks

    Now, check with https://all.goodrxmedicine.com/cenforce-200.html (Please check the credentials in pvt information) this URL.
    It is a clone of https://www.goodrxmedicine.com/cenforce-200.html, and only the URL is different.

    Regards

  • I can confirm that following a link from the cloned magento site, the Back button works correctly.
    But I am not sure what you require me to do ? As the Theme has nothing to do with how those links work. And above we eliminated the only theme related scripts that could have interfered.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.