Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 6b0fd79

Browse files
committed
fixed #808
1 parent 06dd75d commit 6b0fd79

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

dist/select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.11.2 - 2015-03-17T04:08:46.478Z
4+
* Version: 0.11.2 - 2015-03-31T12:42:23.160Z
55
* License: MIT
66
*/
77

dist/select.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.11.2 - 2015-03-17T04:08:46.474Z
4+
* Version: 0.11.2 - 2015-03-31T12:42:23.152Z
55
* License: MIT
66
*/
77

@@ -279,7 +279,7 @@ uis.controller('uiSelectCtrl',
279279
if (ctrl.searchInput.length !== 1) {
280280
throw uiSelectMinErr('searchInput', "Expected 1 input.ui-select-search but got '{0}'.", ctrl.searchInput.length);
281281
}
282-
282+
283283
ctrl.isEmpty = function() {
284284
return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '';
285285
};
@@ -540,7 +540,9 @@ uis.controller('uiSelectCtrl',
540540
ctrl.clear = function($event) {
541541
ctrl.select(undefined);
542542
$event.stopPropagation();
543-
ctrl.focusser[0].focus();
543+
$timeout(function() {
544+
ctrl.focusser[0].focus();
545+
}, 0, false);
544546
};
545547

546548
// Toggle dropdown
@@ -632,6 +634,11 @@ uis.controller('uiSelectCtrl',
632634

633635
var key = e.which;
634636

637+
if (~[KEY.ENTER,KEY.ESC].indexOf(key)){
638+
e.preventDefault();
639+
e.stopPropagation();
640+
}
641+
635642
// if(~[KEY.ESC,KEY.TAB].indexOf(key)){
636643
// //TODO: SEGURO?
637644
// ctrl.close();

dist/select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uiSelectController.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ uis.controller('uiSelectCtrl',
4343
if (ctrl.searchInput.length !== 1) {
4444
throw uiSelectMinErr('searchInput', "Expected 1 input.ui-select-search but got '{0}'.", ctrl.searchInput.length);
4545
}
46-
46+
4747
ctrl.isEmpty = function() {
4848
return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '';
4949
};
@@ -398,6 +398,11 @@ uis.controller('uiSelectCtrl',
398398

399399
var key = e.which;
400400

401+
if (~[KEY.ENTER,KEY.ESC].indexOf(key)){
402+
e.preventDefault();
403+
e.stopPropagation();
404+
}
405+
401406
// if(~[KEY.ESC,KEY.TAB].indexOf(key)){
402407
// //TODO: SEGURO?
403408
// ctrl.close();

0 commit comments

Comments
 (0)