Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

100
Visualizações
How to manually trigger a key press event with Vue

I got in my Vue project a Balkan Orgchart that displays a pretty cool chart that has an option to go "fullscreen" but now I added a button that opens a modal (vuedal) window when pressed. The problem is that I can't see the modal window when the chart is in fullscreen, so I wanted to force the press of the Esc key so the user will get out of the fullscreen mode before opening the modal window.

That's why I wanted to manually trigger the Esc key press event when the user tries to open the modal window.

Any clue?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you are trying to achieve the original event of pressing esc key, you can emit the keydown event with the keycode of the esc key. which is 27.

$emit('keydown', { ...e, keyCode: 27 })
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda