• Resolved mcblake

    (@mcblake)


    After updating to WP 5.6 and clearing all caches, clicking on a custom product tab scrolls to the top of page. Any ideas what is causing this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Hello @mcblake

    Can you please send us a link to one of your products so we can take a look?

    Thank you!
    -Tracy

    Thread Starter mcblake

    (@mcblake)

    Hi @mcblake,

    Our plugin doesn’t enqueue any additional css or js on the frontend, so I would check your theme and look for any event listeners targeting the tabs.

    WordPress 5.6 bumped the jQuery version to 3.5.1, and some jQuery plugins no longer function as they did. Please look here for more information.

    Thanks,
    Jon

    Thread Starter mcblake

    (@mcblake)

    @jpowersdev,

    Thanks for your reply. When I deactivate your plugin the remaining default WooCommerce Product Tabs (e.g. “Description”) work as intended. The page does not scroll to the top with Custom Product Tabs for WooCommerce deactivated. The behaviour is only replicated with Custom Product Tabs for WooCommerce activated. Please advise.

    Hi @mcblake,

    I took a look using the browser debugger, and I’m seeing two things happen:

    1. When you click a tab, woocommerce/assets/js/frontend/single-product.min.js runs some code to hide the previously selected tab’s content and show the new tab’s content. This is the default woocommerce behavior.
    2. A theme file essence-pro/js/smooth-scroll.js tries to scroll to that section on the page, but does so too early while it’s still hidden. As a result, it scrolls to the top of the page.

    Unfortunately, since Essence Pro is a parent theme, I can’t recommend that you edit the theme files. They will get overwritten when the theme is updated.

    You may be able to disable smooth scrolling in your theme options. I would also check and see if there are updates for your theme. Otherwise, your best course of action would be to open a ticket with your Theme’s Developer.

    Thanks,
    Jon

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Clicking tab scrolls to top of page’ is closed to new replies.