developit / developit/tags-input

Keyboard events created with DOM don't trigger

Offen
#22 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
333
Forks
46
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.