Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda