can't tap on item in google autocomplete list on mobile

后端 未结 6 1881
轮回少年
轮回少年 2020-12-04 15:36

I\'m making a mobile-app using Phonegap and HTML. Now I\'m using the google maps/places autocomplete feature. The problem is: if I run it in my browser on my computer everyt

6条回答
  •  余生分开走
    2020-12-04 16:19

    if you are using Framework 7, it has a custom implementation of FastClicks. Instead of the needsclick class, F7 has no-fastclick. The function below is how it is implemented in F7:

     function targetNeedsFastClick(el) {
       var $el = $(el);
       if (el.nodeName.toLowerCase() === 'input' && el.type === 'file') return false;
       if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false;
       return true;
     }
    

    So as suggested in other comments, you will only have to add the .no-fastclick class to .pac-item and in all its children

提交回复
热议问题