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

177
Vistas
All keydown press stops in the keydown event except the tab key

In my react project, I have a scenario wherein the keyDown Event gets triggered on all the keyboard events except the tab event, when I press the tab it focuses on the next element that's there on the page.

Please check the screenshot.

Could you please advise why the tab press doesn't call the onKeyDown event but it does for any other key press?

Thanks

Click here to view the gif: Event get triggered on ArrowDown/w or any other keys except Tab

class CalendarDay extends React.Component {
  constructor(...args) {
    super(...args);

  }

  onKeyDown(day, e) {

  //***** DOESN'T GET TRIGGERED ON 'TAB' KEY PRESS

    const { onDayClick, onFoscusedTabKey, onKeyDownTabFocus } = this.props;
    const { key } = e;
    if (key === 'Enter' || key === ' ') {
      onDayClick(day, e);
    } else if (key === 'Tab' && !e.shiftKey) {
      onFoscusedTabKey(e);
    }

    onKeyDownTabFocus && onKeyDownTabFocus(e);
  }
  

  render() {
    const {
      ...
    } = this.props;


    return (
      <td
        role="link" // eslint-disable-line jsx-a11y/no-noninteractive-element-to-interactive-role
        ref={this.setButtonRef}
        aria-label={ariaLabel}
        onMouseEnter={onDayMouseEnterDebouncedCB}
        onMouseLeave={onDayMouseLeaveDebounceCB}
        onMouseUp={(e) => { e.currentTarget.blur(); }}
        onClick={(e) => { this.onDayClick(day, e); }}
        onKeyDown={(e) => { this.onKeyDown(day, e); }}
      >
        {renderDayContents ? renderDayContents(day, modifiers) : day.format('D')}
      </td>
    );
  }
}

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