Skip to content

Commit

Permalink
Fixed #14105 - AutoComplete && MultiSelect | Fixed focus loose when p…
Browse files Browse the repository at this point in the history
…ressing arrow keys
  • Loading branch information
mehmetcetin01140 committed Nov 15, 2023
1 parent 7216049 commit 24c9300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
this.changeFocusedOptionIndex(event, optionIndex);

event.preventDefault();
event.stopPropagation();
}

onArrowUpKey(event) {
Expand All @@ -1260,6 +1261,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
this.changeFocusedOptionIndex(event, optionIndex);

event.preventDefault();
event.stopPropagation();
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
this.changeFocusedOptionIndex(event, optionIndex);
!this.overlayVisible && this.show();
event.preventDefault();
event.stopPropagation();
}

onArrowUpKey(event, pressedInInputText = false) {
Expand All @@ -1509,6 +1510,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
!this.overlayVisible && this.show();
event.preventDefault();
}
event.stopPropagation();
}

onHomeKey(event, pressedInInputText = false) {
Expand Down

0 comments on commit 24c9300

Please sign in to comment.