我有一个输入标记,我附加了google autocomplete指令,如下面的代码所示。因此,当我开始搜索任何位置时,Google自动填充功能已显示为下拉列表(请参阅屏幕截图)。问题在于,当我搜索某个位置并且Google自动填充根据搜索位置出现时,同时我开始滚动页面,因为Google自动填充也在屏幕上浮动并且滚动条移动(参见屏幕截图)。我应该如何使用输入标记粘贴自动完成功能,以便它(Google自动填充)不会在滚动条移动的页面中浮动?
.pac-container {
background-color: #fff;
position: absolute ;
z-index: 1000;
border-radius: 2px;
border-top: 1px solid #d9d9d9;
font-family: Arial, sans-serif;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden
}
.pac-container:after {
content: "";
padding: 1px 1px 1px 0;
height: 16px;
text-align: right;
display: block;
background-image: url(//maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white2.png);
background-position: right;
background-repeat: no-repeat;
background-size: 104px 16px
}
//使用google autocomplete directive
输入代码的代码下方 <div class="white-pannel col-md-5 businessNameCSS">
<h4 class="pannel-title" ng-repeat="header in vm.businessName" ng-if="header.controlName == 'Header'">
Business Name
</h4>
<div class="form-group"
ng-class="{ 'has-error': businessDetailsForm.submitted &&
businessDetailsForm.businessName.$touched &&
businessDetailsForm.businessName.$invalid }"
ng-repeat="header in vm.businessName"
ng-if="header.controlName == 'Text_Box'">
<input type="text"
id="businessName_ID"
name="businessName"
class="form-control"
placeholder="{{header.additionalInfo}}"
systemrefid="{{header.systemRefId}}"
autocomplete="on|off"
ng-disabled="vm.disableCompletePage"
data-uuid="{{header.uuid}}"
ng-model="vm.businessDetailsForm.uuid[header.uuid]"
required
g-places-autocomplete options="vm.autocompleteOptions">
</div>
</div>