Skip to content

Commit

Permalink
chore(dropdown): Key Up is not focusing disabled items #984
Browse files Browse the repository at this point in the history
  • Loading branch information
dafo committed Apr 24, 2018
1 parent c61da7b commit b825279
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/drop-down/dropDown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ export class IgxDropDownComponent implements OnInit {
@HostListener("keydown.ArrowUp", ["$event"])
public onArrowUpKeyDown(event) {
if (this._focusedItem) {
const focusedItemIndex = this._focusedItem.index;
let focusedItemIndex = this._focusedItem.index;
while ((this.items.toArray()[focusedItemIndex - 1]) && (this.items.toArray()[focusedItemIndex - 1]).isDisabled) {
focusedItemIndex--;
}
if (focusedItemIndex > 0) {
this._focusedItem.isFocused = false;
this._focusedItem = this.items.toArray()[focusedItemIndex - 1];
Expand Down

0 comments on commit b825279

Please sign in to comment.