Skip to content

Commit 59a7577

Browse files
committed
Retain keyboard focus after closing the dropdown.
Fixes angular-ui#46.
1 parent a873eb0 commit 59a7577

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

dist/select.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@
5555
max-height: 200px;
5656
overflow-x: hidden;
5757
}
58+
59+
.ui-select-bootstrap .form-control {
60+
-webkit-transition: none;
61+
transition: none;
62+
}

dist/select.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ angular.module('ui.select', [])
199199
if (ctrl.open) {
200200
_resetSearchInput();
201201
ctrl.open = false;
202+
203+
// Give it time to appear before focus
204+
$timeout(function () {
205+
var _selectButton = $element.querySelectorAll("button.ui-select-match");
206+
_selectButton[0].focus();
207+
});
202208
}
203209
};
204210

0 commit comments

Comments
 (0)