Skip to content

Commit

Permalink
pr remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidasdel committed Jul 18, 2024
1 parent 64119a6 commit 206786b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class DropdownItem {
</span>
</ng-container>
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" (mousedown)="$event.preventDefault()" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [attr.data-pc-section]="'trigger'">
<div class="p-dropdown-trigger" role="button" aria-label="dropdown trigger" (mousedown)="onMouseDown($event)" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [attr.data-pc-section]="'trigger'">
<ng-container *ngIf="loading; else elseBlock">
<ng-container *ngIf="loadingIconTemplate">
<ng-container *ngTemplateOutlet="loadingIconTemplate"></ng-container>
Expand Down Expand Up @@ -1471,6 +1471,10 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
this.preventModelTouched = false;
}

onMouseDown(event: MouseEvent) {
event.preventDefault();
}

onKeyDown(event: KeyboardEvent, search: boolean) {
if (this.disabled || this.readonly || this.loading) {
return;
Expand Down

0 comments on commit 206786b

Please sign in to comment.