ui-select 不会在首次单击 ngAnimate 时将输入元素聚焦

Tom*_*ick 5 angularjs ui-select2 ui-select angular-ui-select

问题是,当您在使用 ngAnimate 的 Angular 项目中有一个 ui-select 并单击它来输入内容时,您将无法输入,直到您再次单击输入元素。基本上,它似乎只关注第二次点击。

\n\n

这似乎是引导主题的问题,并且列表中没有任何项目。

\n\n

http://plnkr.co/edit/jqXDJLN33U75EO9imGER?p=preview

\n\n
  <ui-select ng-model="country.selected" theme="bootstrap" ng-disabled="disabled" style="width: 300px;">\n    <ui-select-match placeholder="Select or search a country in the list...">{{$select.selected.name}}</ui-select-match>\n    <ui-select-choices repeat="country in countries | filter: $select.search">\n      <span ng-bind-html="country.name | highlight: $select.search"></span>\n      <small ng-bind-html="country.code | highlight: $select.search"></small>\n    </ui-select-choices>\n  </ui-select>\n
Run Code Online (Sandbox Code Playgroud)\n\n

\n\n
var app = angular.module(\'selectizeDemo\', [\n  \'ngAnimate\',\n  \'ngSanitize\', \n  \'ui.select\'\n  ]);\n\napp.controller(\'MainCtrl\', function($scope) {\n\n    $scope.countries = [];\n\n  /*$scope.countries = [ \n    {name: \'Afghanistan\', code: \'AF\'},\n    {name: \'\xc3\x85land Islands\', code: \'AX\'},\n    {name: \'Albania\', code: \'AL\'},\n    {name: \'Algeria\', code: \'DZ\'},\n    {name: \'American Samoa\', code: \'AS\'},\n    {name: \'Andorra\', code: \'AD\'},\n    {name: \'Angola\', code: \'AO\'},\n    {name: \'Anguilla\', code: \'AI\'},\n    {name: \'Antarctica\', code: \'AQ\'},\n    {name: \'Antigua and Barbuda\', code: \'AG\'}];*/\n});\n
Run Code Online (Sandbox Code Playgroud)\n\n

正如您所看到的,如果您将项目添加到列表中,或更改主题以进行选择,它就会按预期工作。

\n\n

有什么方法可以解决这个问题吗?

\n