Skip to content

Commit

Permalink
handle feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ntqdinh-axonivy committed Dec 31, 2024
1 parent 90a229f commit 30ad883
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@ export class ProductDetailVersionActionComponent implements AfterViewInit {

@HostListener('document:click', ['$event'])
handleClickOutside(event: MouseEvent): void {
if (!this.elementRef.nativeElement
.querySelector('#download-dropdown-menu')
.contains(event.target)
&&
this.isDropDownDisplayed()
const downloadDialog = this.elementRef.nativeElement.querySelector(
'#download-dropdown-menu'
);
if (
this.isDropDownDisplayed() &&
downloadDialog &&
!downloadDialog.contains(event.target)
) {
this.isDropDownDisplayed.set(!this.isDropDownDisplayed());
}
Expand Down

0 comments on commit 30ad883

Please sign in to comment.