Site logo

[Resolved] iOS Woocommerce Double Click

Home Forums Support [Resolved] iOS Woocommerce Double Click

Home Forums Support iOS Woocommerce Double Click

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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?

    #2123115
    Leo
    Staff
    Customer Support

    Hi 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/

    #2123144
    Ian

    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.

    #2123180
    Leo
    Staff
    Customer Support

    Ahh 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-1315093

    It can be added as a hook element withwp_footer:
    https://docs.generatepress.com/article/hooks-element-overview/
    https://docs.generatepress.com/article/wp_footer/

    #2123242
    Ian

    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?

    #2123244
    Leo
    Staff
    Customer Support

    Yup that’s the correct display rule 🙂

    #2123245
    Ian

    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!

    #2123487
    Leo
    Staff
    Customer Support

    I will try my best to remember 🙂

    #2447280
    K

    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

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