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

138
Views
tabindex se da, se está enfocando pero al ingresar la tecla enter no funcionará

Cuando hago clic en el ícono de búsqueda con el mouse, funciona bien, pero cuando uso la pestaña y el foco va al ícono, pero cuando ingreso la palabra clave "ENTER" no funcionará.

 ` <%-- Mobile Only - Search Icon --%> <div class="mobile-header-icon" onclick="OnClickSearchIcon();" tabindex="0" aria-label="Search"> <i class="search" ></i> </div>`
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Presionar enter no activa un evento de clic.

Puede agregar un oyente para, por ejemplo, un evento keyup.


Aquí hay un ejemplo de trabajo completo:

 function OnClickSearchIcon(){ // do whatever you want instead of this document.body.innerHTML += "<p>Search!</p>"; } function onKeyUp(e){ if (e.key === "Enter") OnClickSearchIcon(); }
 <div tabindex=0 onkeyup="onKeyUp(event)" onclick="OnClickSearchIcon()" > <i class="search" >Click, or focus me and press Enter</i> </div>

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