Skip to content

Commit

Permalink
Fixed #14953 - Add missing stopPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed May 3, 2024
1 parent 3365c74 commit 255d1f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV

// !this.overlayVisible && this.show();
event.preventDefault();
event.stopPropagation();
}

changeFocusedOptionIndex(event, index) {
Expand Down Expand Up @@ -1681,15 +1682,15 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
}

this.overlayVisible && this.hide();
event.preventDefault();
} else {
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.clicked() ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();

this.changeFocusedOptionIndex(event, optionIndex);

!this.overlayVisible && this.show();
event.preventDefault();
}
event.preventDefault();
event.stopPropagation();
}

onArrowLeftKey(event: KeyboardEvent, pressedInInputText: boolean = false) {
Expand Down Expand Up @@ -1790,6 +1791,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
this.overlayVisible && this.hide(this.filter);
}
}
event.stopPropagation();
}

onFirstHiddenFocus(event) {
Expand Down

0 comments on commit 255d1f1

Please sign in to comment.