Sri*_*san 8 internet-explorer google-maps-api-3 google-places-api windows-phone-8
我们正在为我们的产品制作移动网站.
我们在网站上广泛使用Google地方自动填充功能.这用于在用户输入时向他们提供建议.
我们在多个浏览器和设备上测试了这一点.这在Android设备和IOS中运行良好.但是,在Windows Mobile(OS Version 8,IE浏览器)上,自动完成/自动填充列表几乎无法使用
问题:
技术资料我们使用:

我尝试用 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)
它只在第二次输入字符时有效,但至少这次有效。
| 归档时间: |
|
| 查看次数: |
2771 次 |
| 最近记录: |