developit / developit/tags-input
Keyboard events created with DOM don't trigger
- Lenguaje dominante
- JavaScript
- Estrellas
- 333
- Forks
- 46
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
There is a [known bug with Webkit](https://bugs.webkit.org/show_bug.cgi?id=16735) where KeyboardEvents created by the DOM have keyCode and charCode of 0, thus preventing us from manually triggering 'change' or 'input' events with this library.
I have managed to create a workaround by triggering a 'blur' Event on the input, but ultimately triggering the KeyboardEvent with a Tab or Comma would have been a better way of interacting.
Native JavaScript, particularly JS packages, is not my forte but I'm sure a simple solution to this issue would be to modify the event listeners to work off Keys rather than KeyCodes.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empieza reproduciendo el comportamiento de WebKit descrito en el issue: los KeyboardEvents creados por el DOM tienen keyCode y charCode establecidos en 0. Revisa los event listeners de la biblioteca e investiga si pueden usar keys en lugar de key codes; después, verifica que Tab o Comma puedan activar el comportamiento de entrada o cambio previsto sin depender de blur.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100