Skip to main content
All CollectionsTroubleshooting
Google autocomplete prediction not working on mobile devices
Google autocomplete prediction not working on mobile devices

When your customers are having trouble entering their delivery address in our widget when using the mobile device

Jelizaveta avatar
Written by Jelizaveta
Updated over 3 months ago

If you are using the maximum radius or maximum driving distance as the delivery validation method, and the address bar is not autocompleting while on a mobile device, try adding the following code to your store.

This is most likely caused by a package included in your theme called fastclick.min.js.


Add support code

These steps apply only to the Zapiet - Pickup + Delivery widget version 1 or 2. Which version of the widget am I using?

If you're on a legacy version, please reach out to us on chat, and we would be happy to update the widget to the newest version for you!

  1. Click Settings, then Developers.

  2. In the Advanced section, add the code below into the Custom scripts box.

    $(function() {   
    var needsClick = FastClick.prototype.needsClick;
    FastClick.prototype.needsClick = function(target) {
    if ( (target.className || '').indexOf('pac-item') > -1 ) {
    return true;
    } else if ( (target.parentNode.className || '').indexOf('pac-item') > -1) {
    return true;
    } else {
    return needsClick.apply(this, arguments);
    }
    };
    FastClick.attach(document.body);
    });

Troubleshooting

Go through our checklist of settings to ensure everything is set up correctly.

Did this answer your question?