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

254
Visualizações
Looking for event that can trigger my popup on press enter or when my marker is active in vue2 leaflet map

I am working on leaflet map and trying to show popup (<l-popup), when I press ENTER key and also when my marker is on active state then when on Enter press the popup show popup. I have looked through leaflet map doc : https://vue2-leaflet.netlify.app/components/LPopup.html#demo but cannot find any props or event that do what I want.

 <l-marker
          v-for="(loc, index) in locations"
          :key="index"
          @keydown.enter="openPopupOnEnterPress(index)"
         // @keyup.enter = "showPopup = true"
    
        >


     data() {
   return {
      showPopup: false,
   } 
}


methods: {
    openPopupOnEnterPress(e) {
      if (e.keyCode === 13 || e.key === "Enter") {
        alert("Enter was pressed");
      } else {
        console.log("Enter was not pressed");
      }
    },
}

The event or the function openPopupOnEnterPress(e) doesnot event triggers at all. Any help will be much appreciated

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

0

<l-marker
    v-for="(loc, index) in locations"
    :key="index"
    @keydown.enter.native="openPopupOnEnterPress(index)"
    tabindex="0"
/>
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