Skip to content

Commit

Permalink
fix: primefaces#13560 || DropDown clear or close icon on click dropDo…
Browse files Browse the repository at this point in the history
…wn options open randomly primefaces#13560
  • Loading branch information
ashikjs committed Aug 29, 2023
1 parent ac736bc commit 4917b55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,10 +1057,11 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
}

isInputClick(event: MouseEvent): boolean {
const target: HTMLElement = event.target as HTMLElement;
return (
DomHandler.hasClass(event.target, 'p-dropdown-clear-icon') ||
(event.target as HTMLInputElement).isSameNode(this.accessibleViewChild?.nativeElement) ||
((this.editableInputViewChild && (event.target as HTMLInputElement).isSameNode(this.editableInputViewChild.nativeElement)) as boolean)
target.closest('timesicon') !== null ||
(target as HTMLInputElement).isSameNode(this.accessibleViewChild?.nativeElement) ||
((this.editableInputViewChild && (target as HTMLInputElement).isSameNode(this.editableInputViewChild.nativeElement)) as boolean)
);
}

Expand Down

0 comments on commit 4917b55

Please sign in to comment.