diff --git a/src/common.css b/src/common.css index e1026d4a1..2b6fe3865 100644 --- a/src/common.css +++ b/src/common.css @@ -17,6 +17,11 @@ top: 0px !important; } + +.ui-select-choices-row:hover { + background-color: #f5f5f5; +} + /* Select2 theme */ /* Mark invalid Select2 */ diff --git a/src/uiSelectChoicesDirective.js b/src/uiSelectChoicesDirective.js index 69e29b6cc..b8e15982b 100644 --- a/src/uiSelectChoicesDirective.js +++ b/src/uiSelectChoicesDirective.js @@ -41,7 +41,6 @@ uis.directive('uiSelectChoices', choices.attr('ng-repeat', RepeatParser.getNgRepeatExpression($select.parserResult.itemName, '$select.items', $select.parserResult.trackByExp, groupByExp)) .attr('ng-if', '$select.open') //Prevent unnecessary watches when dropdown is closed - .attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')') .attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',false,$event)'); var rowsInner = element.querySelectorAll('.ui-select-choices-row-inner'); diff --git a/src/uiSelectController.js b/src/uiSelectController.js index 486c245a2..245e94eb2 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -198,10 +198,6 @@ uis.controller('uiSelectCtrl', } }; - ctrl.setActiveItem = function(item) { - ctrl.activeIndex = ctrl.items.indexOf(item); - }; - ctrl.isActive = function(itemScope) { if ( !ctrl.open ) { return false; diff --git a/test/select.spec.js b/test/select.spec.js index 80f953c46..c8d60fdab 100644 --- a/test/select.spec.js +++ b/test/select.spec.js @@ -959,35 +959,6 @@ describe('ui-select tests', function() { }); - it('should invoke hover callback', function(){ - - var highlighted; - scope.onHighlightFn = function ($item) { - highlighted = $item; - }; - - var el = compileTemplate( - ' \ - {{$select.selected.name}} \ - \ -
\ -
\ -
\ -
' - ); - - expect(highlighted).toBeFalsy(); - - if (!isDropdownOpened(el)){ - openDropdown(el); - } - - $(el).find('.ui-select-choices-row div:contains("Samantha")').trigger('mouseover'); - scope.$digest(); - - expect(highlighted).toBe(scope.people[5]); - }); - it('should set $item & $model correctly when invoking callback on select and no single prop. binding', function () { scope.onSelectFn = function ($item, $model, $label) {