Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 7c6ff36

Browse files
fix(chips): chipsCtrl.resetChip() should be called synchronously
1 parent 1cc80d3 commit 7c6ff36

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/chips/js/chipDirective.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ function MdChip($mdTheming, $mdUtil) {
5555
if (chipsController) {
5656
chipController.init(chipsController);
5757

58-
angular.element(element[0].querySelector('._md-chip-content'))
59-
.on('blur', function () {
60-
chipsController.$scope.$applyAsync(
61-
angular.bind(chipsController, chipsController.resetSelectedChip)
62-
);
63-
});
58+
angular
59+
.element(element[0]
60+
.querySelector('._md-chip-content'))
61+
.on('blur', function () {
62+
chipsController.resetSelectedChip();
63+
chipsController.$scope.$applyAsync();
64+
});
6465
}
6566
};
6667
}

0 commit comments

Comments
 (0)