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 capture esc keydown event while audio element captures it

Discussão em 'Angular' iniciado por Jeanluca Scaljeri, Outubro 8, 2024.

  1. As you can see in this demo

    <audio controls src="/media/cc0-audio/t-rex-roar.mp3"></audio>


    When you click on the play button and then hit the escape key, the audio elements captures it.

    In my angular app, the audio element sits inside a dialog which I would like to close when the escape button is clicked. But whatever I try, I never receive the keydown event. Is there a way I can make sure that the audio element lets the keywdown through or ignores it?

    Continue reading...

Compartilhe esta Página