Archived topic
Back to top issue
11 replies · Started by Pedro on December 22, 2019
Hello! I don't know why, but for some strange reason when I click the Back to top button on the product page, it adds the product to the cart.
This happens in the mobile version of my site.
Hi there,
Can you confirm that you are using the latest GP premium version 1.9.1?
Let me know :)
Off course, i use all the last version
Ahh I think that's a bug in SVG icon.
What happens if you use font icon instead?
https://docs.generatepress.com/article/svg-icons/
Let me know :)
Hi leo! I made the change but the problem continued
Thought we had this fixed in 1.9 - sorry about that.
Try this CSS:
@media (max-width: 768px) {
.add-to-cart-panel:not(.item-added):not(.show-sticky-add-to-cart) {
pointer-events: none;
}
}
Let me know :)
Hello Tom! The code corrects the problem with the button.
However it makes the Sticky add to cart disappear.
Hmm, it shouldn't - can you add the code so I can see the issue?
What happens is that my site is in production, and adding that code would affect the user experience to my visitors.
Can you try the updated CSS?: https://generatepress.com/forums/topic/back-to-top-issue/#post-1112484
Hello Tom! This new code corrects the problem. Thank you!
If a new version of GP is published and corrects this problem.
Should I delete the code you just gave me?
Yes, you'll be able to remove that CSS in GPP 1.10.