- This topic has 8 replies, 3 voices, and was last updated 3 years, 4 months ago by
K.
-
AuthorPosts
-
February 17, 2022 at 9:11 am #2122980
Ian
I noticed Woocommerce requires a double click on Single Product buttons. I did find Tom referencing this as a temp solution: https://generatepress.com/forums/topic/gp-woocommerce-must-click-add-to-cart-twice-on-mobile/#post-1315093
1. Has there been an official fix / update?
2. Should the Element > Display Rules > Targeting = Product / All Products?February 17, 2022 at 11:11 am #2123115Leo
StaffCustomer SupportHi there,
It should’ve been fixed for sure. We haven’t had other reports on this since then – unless it’s happening again…
Do you experience the issue on our site here?
https://gpsites.co/seller/February 17, 2022 at 11:32 am #2123144Ian
Hi Leo. It is indeed happening at: https://gpsites.co/seller/
It’s happening inside the product level page “Add to Cart”. Does not affect the Add to Cart on the homepage blocks.
Using iOS on Safari.
February 17, 2022 at 11:57 am #2123180Leo
StaffCustomer SupportAhh ok I can replicate it and will log it as a bug.
I wonder if this code still works for a temporary fix:
https://generatepress.com/forums/topic/gp-woocommerce-must-click-add-to-cart-twice-on-mobile/#post-1315093It can be added as a hook element with
wp_footer:
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/wp_footer/February 17, 2022 at 12:26 pm #2123242Ian
Yes, that’s the script that I am running and it seems to work.
May I check if this is the right targeting based on what you see?
Element > Display Rules > Targeting = Product / All Products?
February 17, 2022 at 12:28 pm #2123244Leo
StaffCustomer SupportYup that’s the correct display rule 🙂
February 17, 2022 at 12:29 pm #2123245Ian
Thx! When the fix rolls out, would you mind replying here so I get notified. Would like to remove that piece of code once the official fix is released! TIA!
February 17, 2022 at 5:59 pm #2123487Leo
StaffCustomer SupportI will try my best to remember 🙂
December 2, 2022 at 2:32 pm #2447280K
Hey,
This is actually a known bug on iOS that sometimes occurs when using the Delay JS. This bug causes links to not work until they are clicked twice.
I fixed the issue adding a Hook element:
Hook: wp_head
Location: Entire Site<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.0/fastclick.min.js" integrity="sha512-oljyd1wg75alHReTpDvNIQ4Yj1wZwGxxZhJhId3vr2dKY+26/r/wmMrImwDgin03+7wxyhX+adOQB/2BTvO5tQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script>if ('addEventListener' in document) {document.addEventListener('DOMContentLoaded', function() {FastClick.attach(document.body);}, false);}</script>More details here => https://perfmatters.io/docs/delay-javascript/#ios-double-click
-
AuthorPosts
- You must be logged in to reply to this topic.