<input type="text" class="form-control" typeahead-on-select="setDeliveryArea($item)" ng-model="scope.da" placeholder="Set Delivery Location" onfocus="this.placeholder=''" onblur="this.placeholder='Set Delivery Location'" typeahead="a as a.AreaName for a in scope.deliveryAreas | filter:$viewValue | limitTo:8" ng-blur="getDelivery()" typeahead-editable="false" typeahead-append-to-body="false" autocomplete="off" />
以上是我用来设置文本框以显示数据库中自动填充列表的代码。
虽然它在桌面上的所有浏览器上运行得非常好。它甚至可以在Chrome上使用Mobile View。但是,当打开相同的链接/页面并在Android WebView中访问控件时,它无法正常工作。
有任何解决此问题的建议吗?
PS - autocomplete="off"
是不是更早的东西,但我根据我做的一些谷歌搜索把它。所以无论这个标签如何,它都不起作用。
在不同页面上的类似功能正常工作。该文本框的代码如下所示。即使在Android WebView中,这也完美地显示了该列表。
<input type="text" class="form-control" ng-model="area" placeholder="Delivery Area" onfocus="this.placeholder=''" onblur="this.placeholder='Delivery Area'" typeahead="a as a.AreaName for a in areas | filter:$viewValue | limitTo:8" typeahead-on-select="setDeliveryArea($item)" typeahead-editable="false" typeahead-append-to-body="false" ng-blur="area=(area||'')" typeahead-on-select="model=$item.AreaId">