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

198
Visualizações
Why mouseenter and mouseleave work on mobile?

I want to understand why mouseenter and mouseleave events work on mobile.

I am trying to create a tooltip that hovers on desktop but is clickable on mobile and at first, I just went ahead and implemented those events on VueJS but for some reason when I tested it on mobile, it automatically switched to clickable events. Also, it automatically handles the blur event on mobile (clicking outside it, would close the tooltip)

I could only think of three reasons, either:

  • Browser automatically switched the events
  • Vue is doing the switching of events
  • DOM is doing the switching

I also created a simple codesandbox to play with.


EDIT:

I just tried replicating it on vanilla JS, and same behavior.

Here's the codesandbox.

Based on this, is this safe to continue with this?

I couldn't find any docs that stated this behavior.

about 4 years ago · Juan Pablo Isaza
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