谷歌的地方自动完成插件的心不是在Firefox Android平台 [英] Google Places Autocomplete plugin isnt working in Firefox android

查看:247
本文介绍了谷歌的地方自动完成插件的心不是在Firefox Android平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用我们的网站谷歌的地方-自动完成插件。

We are using google's places-autocomplete plugin on our website.

末我们已经收到了多次投诉从我们的网站访问者,这个插件没有在Firefox Android版本的工作。它工作正常在Firefox的桌面版本但是。

Of late we have received several complaints from our website visitors that this plugin isn't working in the Android version of Firefox. It works fine in the desktop version of Firefox however.

问题可以通过


  1. 要去的地方,例如自动完成这里

  2. 在试图进入一个zip code中的输入位置搜索输入

您遵守以下2个问题 -

You will observe the following 2 issues -


  1. 谷歌自动完成应该表现出建议​​,你开始输入
    拉链code。但事实并非如此,直到有一个类型<大骨节病>空格或<大骨节病>, 5位数邮政编码code之后。

  2. 当建议做显示,你无法选择的第一个建议(键入<大骨节病>空格或<大骨节病>,之后)。当你敲打,光标移回搜索输入。但是,您可以选择正确的第二个或第三个建议。

  1. Google Auto-complete should show suggestions as you start typing the zip code. But it doesn't until one types a space or , after the 5 digit zip code.
  2. When the suggestions do show up (after typing space or ,), you can't choose the first suggestion. As you tap on it, the cursor moves back to the search input. You can however choose the second or third suggestion correctly.

问题#2是用户非常恼人的和令人沮丧的。我们已经收到了几个投诉这个问题。

Problem #2 is extremely annoying and frustrating for the user. We've had received several complaints about this.

我在三星S4证实了这一点在Firefox版本36.0.2运行Android 4.4.2。

I have confirmed this on Firefox version 36.0.2 on a Samsung S4 running Android 4.4.2.

这怎么解决?

推荐答案

一个对第二个问题的解决办法是给第一个自动完成建议上边距,使用户可以点击它。它不是pretty,但它的功能。

A work around for the second issue is to give the first autocomplete suggestion a top margin so the user can click it. Its not pretty but its functional.

CSS

.FirefoxAndroid .pac-container .pac-item:first-child { 
    margin-top: 20px;
}

JS

<script> 
    var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;     
    var is_android = navigator.userAgent.toLowerCase().indexOf('android') > -1; 

    if(is_firefox && is_android){ 
        $('html').addClass('FirefoxAndroid');
    }
</script>

这篇关于谷歌的地方自动完成插件的心不是在Firefox Android平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆