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

Commit d2c6493

Browse files
committed
fix(keys): prevent dropdown to open with cmd key
1 parent 299dacc commit d2c6493

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/select.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
END: 35,
2020
BACKSPACE: 8,
2121
DELETE: 46,
22+
COMMAND: 91,
2223
isControl: function (e) {
2324
var k = e.which;
2425
switch (k) {
26+
case KEY.COMMAND:
2527
case KEY.SHIFT:
2628
case KEY.CTRL:
2729
case KEY.ALT:
@@ -498,7 +500,7 @@
498500
if(ctrl.multiple && KEY.isHorizontalMovement(key)){
499501
processed = _handleMatchSelection(key);
500502
}
501-
503+
502504
if (!processed && ctrl.items.length > 0) {
503505
processed = _handleDropDownSelection(key);
504506
}
@@ -517,12 +519,14 @@
517519

518520
});
519521

520-
_searchInput.on('blur', function() {
521-
$timeout(function() {
522-
ctrl.activeMatchIndex = -1;
523-
ctrl.activeIndex = 0;
524-
});
525-
});
522+
// _searchInput.on('blur', function() {
523+
// console.log("blurring");
524+
// // $timeout(function() {
525+
// // ctrl.activeMatchIndex = -1;
526+
// // ctrl.activeIndex = 0;
527+
// // console.log("blurring done");
528+
// // });
529+
// });
526530

527531
function _getCaretPosition(el) {
528532
if(angular.isNumber(el.selectionStart)) return el.selectionStart;

0 commit comments

Comments
 (0)