diff --git a/src/components/chips/js/chipsController.js b/src/components/chips/js/chipsController.js index f292ab3fff8..103d9d9dece 100644 --- a/src/components/chips/js/chipsController.js +++ b/src/components/chips/js/chipsController.js @@ -116,8 +116,8 @@ this.removeAndSelectAdjacentChip(this.selectedChip); break; case this.$mdConstant.KEY_CODE.LEFT_ARROW: - if (this.selectedChip < 0) this.selectedChip = this.items.length; event.preventDefault(); + if (this.selectedChip < 0) this.selectedChip = this.items.length; if (this.items.length) this.selectAndFocusChipSafe(this.selectedChip - 1); break; case this.$mdConstant.KEY_CODE.RIGHT_ARROW: @@ -331,7 +331,7 @@ inputElement .attr({ tabindex: 0 }) .on('keydown', function(event) { scope.$apply(function() { ctrl.inputKeydown(event); }); }) - .on('focus', function () { scope.$apply(function () { ctrl.selectedChip = null; }); }); + .on('focus', function () { ctrl.selectedChip = -1; }); }; MdChipsCtrl.prototype.configureAutocomplete = function(ctrl) {