Google将自动填充功能置于Windows移动IE浏览器中

Sri*_*san 8 internet-explorer google-maps-api-3 google-places-api windows-phone-8

我们正在为我们的产品制作移动网站.

我们在网站上广泛使用Google地方自动填充功能.这用于在用户输入时向他们提供建议.

我们在多个浏览器和设备上测试了这一点.这在Android设备和IOS中运行良好.但是,在Windows Mobile(OS Version 8,IE浏览器)上,自动完成/自动填充列表几乎无法使用

问题:

  1. 我们无法触摸自动填充列表中的所需项目.触摸它时,它会自动关闭列表(行为类似于我们按"ESC"按钮时所看到的行为或点击窗口上的其他位置).因此,我们无法选择任何列表项.
  2. 列表的呈现位置略低于文本框.此问题也可以在屏幕截图上进行筛选.

技术资料我们使用:

  • jQuery 1.7.1
  • twitter bootstrap 2.3.2

在Windows mobile中测试 - 截图

ReB*_*eBa 0

我尝试用 jquery 做一些调整。这是一个临时解决方案,希望谷歌能够解决这个错误。

我在初始化自动完成文本字段后添加了以下代码:

<input type="text" id="maps-autocomplete" placeholder="I'm staying at..." autocomplete="off" />
Run Code Online (Sandbox Code Playgroud)

加载时:

$(function() {
  var autocomplete = new google.maps.places.Autocomplete((document.getElementById('maps-autocomplete')));
  $('#maps-autocomplete').keyup(function(e) {
    var container = $('.pac-container').first();
    if (container.offset().top > $(this).offset().top + $(this).outerHeight()) {
      container.offset(
        {
          top: $(this).offset().top + $(this).outerHeight()
        }
      );
    }
  });
});
Run Code Online (Sandbox Code Playgroud)

它只在第二次输入字符时有效,但至少这次有效。