Skip to content

Commit

Permalink
fix(core): tuiDropdownContext menu remains open after long tap
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jan 29, 2025
1 parent 0987388 commit ee70670
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ export class TuiDropdownContextDirective extends TuiDriver implements TuiRectAcc
}
}

@HostListener('document:touchstart.silent.passive', ['$event'])
closeOnTwiceTouchStart(event: TouchEvent): void {
if (!(event.target as HTMLElement)?.closest('tui-dropdown')) {
this.closeDropdown();
}
}

getClientRect(): ClientRect {
return this.currentRect;
}
Expand Down

0 comments on commit ee70670

Please sign in to comment.