1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to modify PrimeNg pTooltip directive to stop listening on Escape button

Discussão em 'Angular' iniciado por Borneo777, Julho 29, 2025.

  1. Borneo777

    Borneo777 Guest

    I have a list of 1000 rows and each of them has pTooltip on it.

    <div *ngFor="let l of longList">
    <div [pTooltip]="'Hi'">Text</div>
    </div>


    When I press Escape, the website freezes for about 7s, because of many digest cycles.

    1. I know it is possible to listen on body tag and stopPropagation of Escape event, but then I have to manually handle this event (e.g. to close some dialog)
    2. Disabling hideOnEscape input doesn't solve the problem.

    Is it possible to write custom directive that will modify behaviour of pTooltip directive or change its behaviour using ViewChild ? Other ideas are welcome :) .

    Continue reading...

Compartilhe esta Página