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

Commit 705c54e

Browse files
Splaktarmmalerba
authored andcommitted
fix(autocomplete): two chips added on enter w/ IE11 (#11528)
Fixes #10640. Closes #10667.
1 parent 708fff9 commit 705c54e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/autocomplete/autocomplete.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ describe('<md-autocomplete>', function() {
5454
function keydownEvent(keyCode) {
5555
return {
5656
keyCode: keyCode,
57+
stopImmediatePropagation: angular.noop,
5758
stopPropagation: angular.noop,
5859
preventDefault: angular.noop
5960
};

src/components/autocomplete/js/autocompleteController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
583583
case $mdConstant.KEY_CODE.ENTER:
584584
if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return;
585585
if (hasSelection()) return;
586-
event.stopPropagation();
586+
event.stopImmediatePropagation();
587587
event.preventDefault();
588588
select(ctrl.index);
589589
break;

0 commit comments

Comments
 (0)