_keyup: function(event) {
// handle dropdown keyboard navigation
if (this._activeItem !== null) {
- if (!UiSimpleDropdown.isOpen(this._dropdownContainerId)) {
- return;
- }
-
- if (EventKey.ArrowUp(event)) {
- event.preventDefault();
-
- return this._keyboardPreviousItem();
- }
- else if (EventKey.ArrowDown(event)) {
- event.preventDefault();
-
- return this._keyboardNextItem();
+ if (UiSimpleDropdown.isOpen(this._dropdownContainerId)) {
+ if (EventKey.ArrowUp(event)) {
+ event.preventDefault();
+
+ return this._keyboardPreviousItem();
+ }
+ else if (EventKey.ArrowDown(event)) {
+ event.preventDefault();
+
+ return this._keyboardNextItem();
+ }
+ else if (EventKey.Enter(event)) {
+ event.preventDefault();
+
+ return this._keyboardSelectItem();
+ }
}
- else if (EventKey.Enter(event)) {
- event.preventDefault();
-
- return this._keyboardSelectItem();
+ else {
+ this._activeItem = null;
}
}