Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
Cómo excluir window.getSelection() para incluir el texto de información sobre herramientas al seleccionar texto html en Chrome (Funciona bien en Firefox)

yo tenia el siguiente codigo

ejemplo html

 <p> <span class="highlighting-tooltip>I BEAT COVID <span class="highlighting-tooltiptext">CAPITAL ERROR</span> </span> </p>

Archivo CSS

 .highlighting-tooltip { position: relative; display: inline-block; } .highlighting-tooltip .highlighting-tooltiptext { visibility: hidden; background-color: #333; color: #fff; margin-left: -90px; top:100%; margin-top:40px; user-select: none; z-index: 1; } .highlighting-tooltip:hover .highlighting-tooltiptext { visibility: visible; }

En la parte superior, se muestra el texto "I BEAT COVID" en html y cuando se desplaza con el puntero del mouse, se muestra la información sobre herramientas. El problema es cuando selecciono este texto "I BEAT COVID" y obtengo el resultado de window.getSelection(), luego también incluye el texto "CAPITAL ERROR"

Verifiqué que funciona bien en Firefox y "ERROR DE MAYÚSCULAS" no está incluido, solo Chrome está dando este error. ¿Hay alguna forma en Chrome de evitar que este texto de información sobre herramientas se incluya en window.getSelection() ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!